types¶
Classes¶
Module Contents¶
- class types.Type(type_name: str = 'unknown type')¶
- type_name = 'unknown type'¶
- __call__(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 types.Number(minimum: int | float = None, maximum: int | float = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = int)¶
Bases:
Type- CAST_OPTIONS¶
- _cast¶
- _minimum = None¶
- _maximum = None¶
- _choices = []¶
- __call__(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 types.Integer(minimum: int = None, maximum: int = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = int)¶
Bases:
Number
- class types.Float(minimum: int = None, maximum: int = None, choices: Iterable = None, type_name: str = 'number type', cast: Callable = float)¶
Bases:
Number
- class types.String(ignore_case: bool = False, max_length: int = None, choices: Iterable = None, type_name: str = 'string type')¶
Bases:
Type- _ignore_case = False¶
- _max_length = None¶
- _choices = []¶
- __call__(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: