Pydantic
the six Ws · specification
Python developers who need reliable runtime data validation and settings management.
A data validation and settings management library that uses standard Python type hints to parse, validate, and serialize data structures.
Used inside Python applications, APIs, and libraries, most notably as the validation core of FastAPI.
Use whenever untrusted or structured input, such as an API request or LLM output, must be parsed into typed objects.
It catches malformed data early with clear errors instead of letting bad data propagate through the system.
Implemented in Rust for its core validation engine (pydantic-core) with a Python API layer.
Open source, MIT licensed, no credentials required; widely used as a foundational dependency across the Python AI ecosystem.
alternatives
works with