typedload is a schema validation library to load data from json/bson/yaml/whatever into python typed data structures (dataclass/NamedTuple/attr) and dump it back.
It is very fast, it supports commonly used python data structures rather than requiring to inherit or decorate everything in the code, so it's easy to adopt (or drop).
It handles unions really well, including complicated cases that don't work with msgspec and other such libraries.
Main differences from pydantic:
* Designed from the start with mypy in mind
* Much smaller in size (kb vs mb)
* Designed to use attr or dataclass for custom validators, rather than (badly) reinventing the wheel
* API breaking changes only happen on major releases
typedload is a schema validation library to load data from json/bson/yaml/whatever into python typed data structures (dataclass/NamedTuple/attr) and dump it back.
It is very fast, it supports commonly used python data structures rather than requiring to inherit or decorate everything in the code, so it's easy to adopt (or drop).
It handles unions really well, including complicated cases that don't work with msgspec and other such libraries.
Main differences from pydantic:
* Designed from the start with mypy in mind * Much smaller in size (kb vs mb) * Designed to use attr or dataclass for custom validators, rather than (badly) reinventing the wheel * API breaking changes only happen on major releases