Pydantic
Data validation and parsing library using Python type hints.
Used in agent projects
649
5.1% of 12,697 public repos built with AI coding agents
Rank in forms, validation and schemas
#4 of 22
by use in those projects
Downloads
222M
PyPI, last 7 days, pydantic
GitHub stars
29K
last push Oct 9, 2026
How Pydantic is used
Pydantic is a dependency in 649 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (5.1%), #4 of 22 in forms, validation and schemas. The most used alternative there is Zod. Projects that use it most often also use python-dotenv (59.0%), Uvicorn (54.7%), FastAPI (54.5%). It is more common in projects set up for Roo Code (12.4%) than for OpenAI Codex (4.7%).
Often used with Pydantic
| python-dotenv | 59.0% of Pydantic projects · 9.0× more than average |
|---|---|
| Uvicorn | 54.7% of Pydantic projects · 12.8× more than average |
| FastAPI | 54.5% of Pydantic projects · 12.9× more than average |
| Requests | 40.4% of Pydantic projects · 7.6× more than average |
| NumPy | 34.4% of Pydantic projects · 9.0× more than average |
| Pydantic Settings | 33.3% of Pydantic projects · 16.8× more than average |
| PyYAML | 32.5% of Pydantic projects · 10.7× more than average |
| SQLAlchemy | 27.6% of Pydantic projects · 14.0× more than average |
By coding agent
| GitHub Copilot | 9.3% of projects set up for it |
|---|---|
| Claude Code | 7.6% of projects set up for it |
| Cursor | 8.1% of projects set up for it |
| Gemini CLI | 5.7% of projects set up for it |
| Devin Desktop | 7.7% of projects set up for it |
| OpenAI Codex | 4.7% of projects set up for it |
| OpenCode | 5.9% of projects set up for it |
| Roo Code | 12.4% of projects set up for it |
Share of public repos configured for each agent that list Pydantic as a dependency.
Install
| Package | pip install pydantic |
|---|---|
| Main stacks | Python (636), Next.js (10), Other (2), .NET (1) |
| Example projects | dramaclaw/dramaclaw, The-Swarm-Corporation/AutoHedge, learntocloud/learn-to-cloud-app, Kaggle/kaggle-environments, MotleyAI/motleycrew |
Alternatives to Pydantic
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Zod npm TypeScript-first schema validation library with static type inference. |
2,153 (17.0%) | 326M | 44.1K | MIT |
| React Hook Form npm Performant form state library using React Hooks with minimal rerenders. |
1,021 (8.0%) | 54.7M | 44.9K | MIT |
| React Hook Form Resolvers npm Validation resolvers for React Hook Form supporting Zod, Yup, and others. |
885 (7.0%) | 45.1M | 2,264 | MIT |
| Ajv npm Fast JSON Schema validator for runtime schema validation and serialization. |
131 (1.0%) | 391M | 14.9K | MIT |
| jsonschema pypi Python implementation of JSON Schema validation for structured data. |
129 (1.0%) | 125M | 4,989 | — |
| Protocol Buffers pypi Serialization format and code generator for structured data. |
75 (0.6%) | 154M | — | 3-Clause BSD License |
| drizzle-zod npm Generate Zod validation schemas automatically from Drizzle ORM database schemas. |
68 (0.5%) | 3.2M | 36K | Apache-2.0 |
| ajv-formats npm Format validation plugin for Ajv JSON schema validator (email, UUID, date, etc). |
56 (0.4%) | 141M | 228 | MIT |