Data Type Classes

These classes manage the data types available in the system. They handle validation and data conversion for the system. The system comes with seveal datatypes pre-defined, but you can add more if you need special handling of your data.

Data Type Base Class

class AdvConfigMgr.config_types.DataTypeBase(validations=None, allow_empty=True, empty_type=Empty Value)[source]
Parameters:
  • allow_empty – set to False if validation should be raised on empty or blank fields.
  • empty_types – set to a tuple of types that are considered empty
  • validations – a list or tuple of validation classes to run.
from_string(value, validate=True)[source]

Returns an object matching the datatype from a string

to_string(value)[source]

Returns a string version of the value passed.

validated(value)[source]

Runs all validations and returns the value if validated. :param value: value to be validated :return:

Pre-Configured Validation Classes