This module contains base classes to map config files to dicts
The main classes are ConfigDict
and INIConfigFile
. The ConfigDict
defines a dictionary of config keys. To add a key in this dictionary it must first be defined using one of the sub-classes of ConfigDefinition
. This definition takes care of validating the value of the config keys and (de-)serializing the values from and to text representation used in the config files. The INIConfigFile
maps to a INI-style config file that defines multiple sections with config keys. It is represented as a dictionary where each key maps a to a ConfigDict
.
Both derive from ControlledDict
which defines the changed signal which can be used to track changes in the configuration.
Typically these classes are not instantiated directly, but by the ConfigManager
defined in zim.config.manager
.
Class | Boolean |
This class defines a config key that maps to a boolean |
Class | Choice |
Definition that allows selecting a value from a given set Will be presented in the gui as a dropdown with a list of choices |
Class | ConfigDefinition |
Definition for a key in a ConfigDict |
Class | ConfigDefinitionByClass |
Definition that enforces the value has to have a certain class |
Class | ConfigDict |
The class defines a dictionary of config keys. |
Class | ControlledDict |
Sub-class of DefinitionOrderedDict that tracks modified state. This modified state is recursive for nested ControlledDicts. |
Class | Coordinate |
No summary |
Class | Float |
This class defines a config key that maps to a float |
Class | HierarchicDict |
No summary |
Class | HierarchicDictFrame |
Object acts as a member dict for HierarchicDict |
Class | INIConfigFile |
No summary |
Class | Integer |
This class defines a config key that maps to an integer value |
Class | Range |
Definition that defines an integer value in a certain range |
Class | SectionedConfigDict |
Dict with multiple sections of config values Sections are handled automatically when a non-existing item is retrieved. |
Class | String |
This class defines a config key that maps to a string |
Class | StringAllowEmpty |
Like String but defaults to allow_empty=True |
Function | build_config_definition |
Convenience method to construct a ConfigDefinition object based on a default value and/or a check. |
Variable | logger |
Undocumented |
Variable | _definition_classes |
Undocumented |