nkdsl.configsΒΆ
Configuration management for nkDSL.
This module provides a typed, environment-aware configuration system.
All nkDSL options are bound to environment variables with the prefix
NKDSL_ and are matched case-insensitively for convenience.
The public singleton exported by this module is cfg.
Functions
|
Cast a value to a type. |
|
Add dunder methods based on the fields defined in the class. |
|
Remove any common leading whitespace from every line in text. |
|
|
|
Validates non-negative integers. |
|
Parses a boolean with permissive string handling. |
|
Parses a comma-separated value list into a tuple of strings. |
|
Parses a float value. |
|
Parses an integer value. |
|
Parses an optional integer. |
|
Parses an optional string. |
|
Validates strictly positive floats. |
|
Validates strictly positive integers. |
|
Return a new object replacing specified fields with new values. |
Classes
|
Special type indicating an unconstrained type. |
|
Typed, hookable, and singleton configuration manager for nkDSL. |
|
Defines when a configuration option may be changed. |
|
Represents a single effective configuration mutation event. |
|
Static declaration of one configuration option. |
|
Describes where an observed configuration value originated. |
|
Abstract base class for generic types. |
|
An immutable dictionary used for package-wide static variables. |
|
Typed version of the return of open() in text mode. |
|
Type variable. |
Exceptions
|
Base class for all nkDSL configuration errors. |
|
Raised when a configuration value fails parsing or validation. |
|
Raised when accessing or mutating an unknown configuration option. |