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.
(dictshield successor)
Python Data Structures for Humans™.
Schematics is a Python library to combine types into structures, validate them, and transform the shapes of your data based on simple descriptions.
The internals are similar to ORM type systems, but there is no database layer in Schematics. Instead, we believe that building a database layer is made significantly easier when Schematics handles everything but writing the query.
Data validation, filtering and sanitization for JavaScript
good advice: if you know your [validation] errors and their consequences, it's can be ok not to validate 100%.