class documentation
A dict-like configuration storage with additional support for namespaces, validators, meta-data, on_change listeners and more. This storage is optimized for fast read access. Retrieving a key or using non-altering dict methods (e.g. `dict.get()`) has no overhead compared to a native dict.
Class |
|
Undocumented |
Method | __call__ |
Undocumented |
Method | __delattr__ |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | __getattr__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __setattr__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | clear |
Undocumented |
Method | load |
Load values from an *.ini style config file. |
Method | load |
Import values from a dictionary structure. Nesting can be used to represent namespaces. |
Method | meta |
Return the value of a meta field for a key. |
Method | meta |
Return an iterable of meta field names defined for a key. |
Method | meta |
Set the meta field for a key to a new value. This triggers the on-change handler for existing keys. |
Method | setdefault |
Undocumented |
Method | update |
If the first parameter is a string, all keys are prefixed with this namespace. Apart from that it works just as the usual dict.update(). Example: ``update('some.namespace', key='value')`` |
Class Variable | __slots__ |
Undocumented |
Instance Variable | _meta |
Undocumented |
Instance Variable | _on |
Undocumented |
Load values from an *.ini style config file. If the config file contains sections, their names are used as namespaces for the values within. The two special sections ``DEFAULT`` and ``bottle`` refer to the root namespace (no prefix).
Import values from a dictionary structure. Nesting can be used to represent namespaces. >>> ConfigDict().load_dict({'name': {'space': {'key': 'value'}}}) {'name.space.key': 'value'}