conf_engine.options

Module Contents

Classes

_UndefinedDefault

An object that represents a default that is not defined. Should not be

Option

CLass representing an option to be registered with the Configuration object.

StringOption

CLass representing an option to be registered with the Configuration object.

NumberOption

CLass representing an option to be registered with the Configuration object.

BooleanOption

CLass representing an option to be registered with the Configuration object.

Attributes

UNDEFINED

class conf_engine.options._UndefinedDefault

An object that represents a default that is not defined. Should not be used outside the Config Engine module itself.

conf_engine.options.UNDEFINED
class conf_engine.options.Option(name, option_type: conf_engine.types.Type = None, default: any = UNDEFINED)

CLass representing an option to be registered with the Configuration object. All Options have a subset of shared properties, name, default, type, etc. Inheriting classes may implement additional kwargs as appropriate to their type. When a default is set it will be validated using the option_type specified.

__str__(self)

Return str(self).

__call__(self, value)
__eq__(self, other: Option)

Return self==value.

class conf_engine.options.StringOption(*args, option_type: conf_engine.types.String = None, ignore_case: bool = False, max_length: int = None, choices: Iterable = None, type_name: str = 'string type', **kwargs)

Bases: Option

CLass representing an option to be registered with the Configuration object. All Options have a subset of shared properties, name, default, type, etc. Inheriting classes may implement additional kwargs as appropriate to their type. When a default is set it will be validated using the option_type specified.

class conf_engine.options.NumberOption(*args, option_type: conf_engine.types.Number = None, minimum: Union[int, float] = None, maximum: Union[int, float] = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = int, **kwargs)

Bases: Option

CLass representing an option to be registered with the Configuration object. All Options have a subset of shared properties, name, default, type, etc. Inheriting classes may implement additional kwargs as appropriate to their type. When a default is set it will be validated using the option_type specified.

class conf_engine.options.BooleanOption(*args, option_type=t.Boolean(), **kwargs)

Bases: Option

CLass representing an option to be registered with the Configuration object. All Options have a subset of shared properties, name, default, type, etc. Inheriting classes may implement additional kwargs as appropriate to their type. When a default is set it will be validated using the option_type specified.