Pydantic

Pydantic is a data validation library for Python. It allows you create classes whose properties adhere to specific data types, and provides type hints.

Alternatives

Use TypedDict when you want to enforce a specific dictionary structure during development and static type checking is sufficient for your needs.

Running APIs

Use Pydantic when you need strong runtime validation, type coercion, and extra features like default values and validators, especially in scenarios like API development or data parsing.

Pydantic
Interactive graph
On this page
Alternatives