Helper to load config defaults in same way across core and extensions
Logical group of config values that correspond to a config section.
Schemas are set up by assigning config keys with config values to instances. Once setup deserialize() can be called with a dict of values to process. For convienience we also support format() method that can used for converting the values to a dict that can be printed and serialize() for converting the values to a form suitable for persistence.
Schema for handling multiple unknown keys with the same type.
Does not sub-class ConfigSchema, but implements the same serialize/deserialize interface.
Boolean value.
Accepts 1, yes, true, and on with any casing as True.
Accepts 0, no, false, and off with any casing as False.
Represents a config key’s value and how to handle it.
Normally you will only be interacting with sub-classes for config values that encode either deserialization behavior and/or validation.
Each config value should be used for the following actions:
None values should not be deserialized, serialized or formatted, the code interacting with the config should simply skip None config values.
Deprecated value
Used for ignoring old config values that are no longer in use, but should not cause the config parser to crash.
Integer value.
List value.
Supports elements split by commas or newlines. Newlines take presedence and empty list items will be filtered out.
Log level value.
Expects one of critical, error, warning, info, debug, or all, with any casing.
File system path
The following expansions of the path will be done:
Network port value.
Expects integer in the range 0-65535, zero tells the kernel to simply allocate a port for us.
Validate that value is one of the choices
Normally called in deserialize().
Validate that value is at most maximum
Normally called in deserialize().
Validate that value is at least minimum
Normally called in deserialize().
Validate that value is set if required
Normally called in deserialize() on the raw string, _not_ the converted value.