May-04-2020, 10:12 AM
ValidatedDC
is a regular Python dataclass, but with the ability to check the validity of the data by which this dataclass was initialized. Also, you can check the data at any time during the life of the instance.1. Support for standard and custom Python classes.
2. Support for some aliases from the
typing
module, namely: Any
, List
, Literal
, Optional
, Union
. These aliases can be embedded in each other.3. When initializing an instance of a class, you can use the value of the field
dict
instead of the ValidatedDC
instance specified in the field annotation (useful, for example, when retrieving data via api).See detailed: https://github.com/EvgeniyBurdin/validated_dc