Pydantic Validation Data validation using Python type hints. Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. Define how data should be in pure, canonical Python 3.10+; validate it with…
Pydantic Validation







https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json" rel="noopener nofollow" target="_blank">

Data validation using Python type hints.
Fast and extensible, Pydantic plays nicely with your linters/IDE/brain.
Define how data should be in pure, canonical Python 3.10+; validate it with Pydantic.
Pydantic Logfire :fire:
We've launched Pydantic Logfire to help you monitor your applications.
Learn more
Pydantic V1.10 vs. V2
Pydantic V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to Pydantic V1.
If you're using Pydantic V1 you may want to look at the
pydantic V1.10 Documentation or,1.10.X-fixes git branch. Pydantic V2 also ships with the latest version of Pydantic V1 built in so that you can incrementally upgrade your code base and projects: from pydantic import v1 as pydantic_v1.
Help
See documentation for more details.
Installation
Install using pip install -U pydantic or conda install pydantic -c conda-forge.
For more installation options to make Pydantic even faster,
see the Install section in the documentation.
A Simple Example
python
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class User(BaseModel):
id: int
name: str = 'John Doe'
signup_ts: Optional[datetime] = None
friends: list[int] = []
external_data = {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']}
user = User(**external_data)
print(user)
#> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
print(user.id)
#> 123
Contributing
For guidance on setting up a development environment and how to make a
contribution to Pydantic, see
Contributing to Pydantic.
Reporting a Security Vulnerability
See our security policy.
Members
-
pydantic ★ PINNED
Data validation using Python type hints
Python ★ 28k 18h agoExplain → -
pydantic-ai ★ PINNED
AI Agent Framework, the Pydantic way
Python ★ 18k 9h agoExplain → -
monty ★ PINNED
A minimal, secure Python interpreter written in Rust for use by AI
Rust ★ 7.8k 10h agoExplain → -
logfire ★ PINNED
AI observability platform for production LLM and agent systems.
Python ★ 4.3k 10h agoExplain → -
pydantic-settings ★ PINNED
Settings management using pydantic
Python ★ 1.4k 10h agoExplain → -
jiter ★ PINNED
Fast iterable JSON parser.
Rust ★ 531 10h agoExplain → -
FastUI ▣
Build better UIs faster.
Python ★ 9.0k 2mo agoExplain → -
pydantic-core ▣
Core validation logic for pydantic written in rust
Python ★ 1.8k 5mo agoExplain → -
httpx2
A next generation HTTP client for Python. 🦋
Python ★ 608 8d agoExplain → -
pydantic-ai-harness
Batteries for your Pydantic AI agent.
Python ★ 568 9h agoExplain → -
bump-pydantic ▣
Convert Pydantic from V1 to V2 ♻
Python ★ 350 24d agoExplain → -
pydantic-extra-types
Extra Pydantic types.
Python ★ 321 17d agoExplain → -
genai-prices
Calculate prices for calling LLM inference APIs.
Python ★ 308 9h agoExplain → -
speedate
Fast and simple datetime, date, time and duration parsing for rust.
Rust ★ 249 2mo agoExplain → -
mcp-run-python ▣
MCP server to run Python code in a sandbox.
Python ★ 192 4mo agoExplain → -
pydantic-ai-gateway ▣
No description.
TypeScript ★ 190 2mo agoExplain → -
pydantic.run
Python browser sandbox.
TypeScript ★ 188 1y agoExplain → -
pytest-examples
Pytest plugin for testing examples in docstrings and markdown files.
Python ★ 167 4mo agoExplain → -
logfire-mcp ▣
The Logfire MCP Server is here! :tada:
Python ★ 161 2mo agoExplain → -
talks
Talks about Pydantic, PydanticAI and Logfire
HTML ★ 91 5d agoExplain → -
skills
No description.
Python ★ 81 21h agoExplain → -
logfire-demo
No description.
Python ★ 79 2mo agoExplain → -
logfire-rust
No description.
Rust ★ 74 12d agoExplain → -
pydantic-stack-demo
Demos of the Pydantic Stack
Python ★ 72 1mo agoExplain → -
logfire-js
JavaScript and TypeScript SDK for Logfire
TypeScript ★ 69 9h agoExplain → -
typing-inspection
Runtime typing introspection tools
Python ★ 65 4mo agoExplain → -
hooky
Productivity tools for popular open source repos, used by pydantic
Python ★ 64 2y agoExplain → -
ai-chat-ui
Web UI for Pydantic AI agents, built over the Vercel AI protocol
TypeScript ★ 55 1mo agoExplain → -
logfire-helm-chart
Helm Chart for running Logfire 🪵️🔥
Go Template ★ 49 3d agoExplain → -
braindump
Extract coding rules from PR review comments and generate AGENTS.md files for any GitHub repository.
Python ★ 42 3mo agoExplain → -
pydantic-ai-temporal-example
No description.
Python ★ 32 7mo agoExplain → -
ollama-action
No description.
Shell ★ 26 1y agoExplain → -
pydantic-handlebars
No description.
Python ★ 20 27d agoExplain → -
datafusion-query-cache ▣
Cache the intermediate results of queries on timeseries data in DataFusion.
Rust ★ 19 1y agoExplain → -
claude-code-logfire-plugin
Claude Code plugin that sends OpenTelemetry traces to Logfire.
Python ★ 12 25d agoExplain → -
connect4
Demo of what PydanticAI and Logfire can do!
TypeScript ★ 12 1mo agoExplain → -
datafusion ⑂
Apache DataFusion SQL Query Engine
Rust ★ 10 11h agoExplain → -
strict-no-cover
Error on unnecessary `pragma: no cover` comments.
Python ★ 10 10mo agoExplain → -
mcpdb
MCP server to store / search data
Rust ★ 9 1y agoExplain → -
arrow-rs ⑂
Official Rust implementation of Apache Arrow
Rust ★ 7 4d agoExplain → -
logfire-vscode
A Visual Studio Code extension for Pydantic Logfire
TypeScript ★ 5 16d agoExplain → -
odmantic ⑂
Sync and Async ODM (Object Document Mapper) for MongoDB based on python type hints
★ 5 2y agoExplain → -
terraform-provider-logfire
Logfire Terraform Provider
Go ★ 4 12d agoExplain → -
liquid-cache ⑂
10x lower latency for cloud-native DataFusion
★ 4 1y agoExplain → -
logfire-logs-proxy ▣
No description.
TypeScript ★ 3 1y agoExplain → -
datafusion-functions-json ⑂
JSON support for DataFusion (unofficial)
Rust ★ 2 5d agoExplain → -
files.pydantic.run
public pydantic files
TypeScript ★ 2 1y agoExplain → -
logfire-auth-action
Authenticate GitHub Actions to Logfire via OIDC token exchange (RFC 8693) — short-lived workload tokens, no stored secrets.
TypeScript ★ 1 2d agoExplain → -
otel-cf-workers ⑂
An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
TypeScript ★ 1 1mo agoExplain → -
logfire-claude-plugin
No description.
★ 1 4mo agoExplain → -
pydantic-docs
Common infrastructure to build documentation for the Pydantic projects
Python ★ 1 4mo agoExplain → -
datafusion-distributed ⑂
Repo for donation of distributed DataFusion prototype - repo name will change
Rust ★ 1 1mo agoExplain → -
logfire-lsp
A Language Server Protocol implementation for Pydantic Logfire
Python ★ 1 11mo agoExplain → -
arrow-rs-object-store ⑂
Rust object_store crate
★ 1 1mo agoExplain → -
duckdb-rs ⑂
Ergonomic bindings to duckdb for Rust
★ 1 11mo agoExplain → -
datafusion-table-providers ⑂
DataFusion TableProviders for reading data from other systems
★ 1 10mo agoExplain → -
datafusion-federation ⑂
Allow DataFusion to resolve queries across remote query engines while pushing down as much compute as possible down.
★ 1 10mo agoExplain → -
.github
No description.
★ 1 2y agoExplain → -
datafusion-variant ⑂
user-defined functions for Variant handling in Datafusion
Rust ★ 0 10d agoExplain → -
brand
logo and brand guides
★ 0 19d agoExplain → -
pulumi-logfire
Logfire Pulumi provider
Makefile ★ 0 12d agoExplain → -
opentelemetry-python ⑂
OpenTelemetry Python API and SDK
★ 0 1mo agoExplain → -
provider-upjet-logfire
Crossplane Upjet provider for Logfire
Go ★ 0 1mo agoExplain → -
pydantic-media-kit
No description.
★ 0 1mo agoExplain → -
logfire-vercel-ai-demo
Minimal Next.js chat app with Vercel AI SDK, instrumented with OpenTelemetry and sending traces to Pydantic Logfire
TypeScript ★ 0 2mo agoExplain → -
datafusion-sqlparser-rs ⑂
Extensible SQL Lexer and Parser for Rust
Rust ★ 0 12d agoExplain → -
opentelemetry-rust ⑂
The Rust OpenTelemetry implementation
★ 0 4mo agoExplain → -
tracing-opentelemetry ⑂
No description.
★ 0 6mo agoExplain → -
reqwest-middleware ⑂
Wrapper around reqwest to allow for client middleware chains.
★ 0 6mo agoExplain → -
tracing-opentelemetry-instrumentation-sdk ⑂
Middlewares and tools to integrate axum + tracing + opentelemetry
★ 0 6mo agoExplain → -
rust-jemalloc-pprof ⑂
Convert jemalloc heap profiles to pprof to understand memory usage, fix memory leaks, and fix OOM Kills.
★ 0 6mo agoExplain → -
pydantic-who
No description.
Python ★ 0 6mo agoExplain → -
vortex ⑂
An extensible, state of the art columnar file format. Formerly at @spiraldb, now an Incubation Stage project at LFAI&Data, part of the Linux Foundation.
★ 0 8mo agoExplain → -
datafusion-site ⑂
Apache DataFusion Web Site
JavaScript ★ 0 10mo agoExplain → -
demo-endpoints
cloudflare worker with some endpoints useful for demos
TypeScript ★ 0 11mo agoExplain → -
nextjs-client-side-instrumentation ⑂ ▣
No description.
TypeScript ★ 0 1y agoExplain → -
site-feedback
Use to record feedback on docs.pydantic.dev
★ 0 3y agoExplain → -
pydantic-core-feedstock ⑂
A conda-smithy repository for pydantic-core.
★ 0 3y agoExplain → -
pydantic-feedstock ⑂
A conda-smithy repository for pydantic.
★ 0 3y agoExplain →
No repos match these filters.