conf_engine.types
¶
Module Contents¶
Classes¶
- class conf_engine.types.Type(type_name: str = 'unknown type')¶
- __call__(self, value)¶
Value is passed to the type object for the object to verify that the value matches the parameters defined for the type. :param value: :return:
- class conf_engine.types.Number(minimum: Union[int, float] = None, maximum: Union[int, float] = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = int)¶
Bases:
Type
- CAST_OPTIONS¶
- __call__(self, value)¶
Value is passed to the type object for the object to verify that the value matches the parameters defined for the type. :param value: :return:
- static _is_float(value)¶
- static _is_integer(value)¶
- static _is_number(value)¶
- class conf_engine.types.Integer(minimum: int = None, maximum: int = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = int)¶
Bases:
Number
- class conf_engine.types.Float(minimum: int = None, maximum: int = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = float)¶
Bases:
Number
- class conf_engine.types.String(ignore_case: bool = False, max_length: int = None, choices: Iterable = None, type_name: str = 'string type')¶
Bases:
Type
- __call__(self, value)¶
Value is passed to the type object for the object to verify that the value matches the parameters defined for the type. :param value: :return:
- class conf_engine.types.Boolean(type_name: str = 'boolean type')¶
Bases:
Type
- TRUE = ['true', '1', 'on', 'yes']¶
- FALSE = ['false', '0', 'off', 'no']¶
- __call__(self, value)¶
Value is passed to the type object for the object to verify that the value matches the parameters defined for the type. :param value: :return: