The zugbruecke.Config
class
Internally, configuration is read and managed via a dedicated class, zugbruecke.Config
.
- class zugbruecke.Config(**override)
Handles the module’s configuration. Subclass of
dict
. It holds default values and overwrites them with values found in configuration files and environment variables.- Parameters
override (
Any
) – Specify custom values for configuration parameters via keyword arguments.
- __getitem__(key)
Returns values from the following sources in the following order:
Environment variables (only on Unix side)
Internal storage, i.e. changed in the dictionary or read from configuration files.
Default values.
- Parameters
key (
str
) – Name of configuration value.- Return type
Any
- Returns
Arbitrary configuration value.
- export_dict()
Exports a dictionary.
- Return type
Dict
[str
,Any
]
- export_envvar_dict()
Exports a dictionary which can passed to the OS as a set of environment variables for
zugbruecke
itself.- Return type
Dict
[str
,str
]