nkdsl.cfg¶
- cfg = ConfigManager(options=7, runtime_locked=False)¶
Typed, hookable, and singleton configuration manager for nkDSL.
Options are declared with typed helpers (e.g.
define_bool(),define_enum()) and bound toNKDSL_-prefixed environment variables which are matched case-insensitively.Effective value precedence (highest to lowest):
Forced environment value (
env_force)Thread-local override (
ConfigMutability.RUNTIMEoptions only)User global override
Environment default value (
env_default)Built-in option default
Notes
Forced environment values are intentionally immutable from Python.
ConfigMutability.STARTUPoptions become immutable oncelock_runtime()is called.ConfigMutability.RUNTIMEoptions can be changed globally or per-thread viapatch()andthread_local_override().