4 results
tagged
serialization
cattrs: Flexible Object Serialization and Validation
Because validation belongs to the edges.
cattrs is a Swiss Army knife for (un)structuring and validating data in Python. In practice, that means it converts unstructured dictionaries into proper classes and back, while validating their contents.
Example
cattrs works best with attrs classes, and dataclasses where simple (un-)structuring works out of the box, even for nested data, without polluting your data model with serialization details:
A lightweight library for converting complex datatypes to and from native Python datatypes.