Generated on 2026-11-23, data as of 2026-11-19 (UTC)
Pydantic — Python Installation & Lockfile Pinning
Data validation using Python type hints, backed by a Rust core validator. Supported Python versions: >=3.10.
Install Package
Choose pip for quick local prototyping or open the uv / requirements.txt (Pinned) tab for reproducible CI deployments.
Install the latest compatible release via pip:
pip install pydantic
Quick Validation Example
from pydantic import BaseModel
class Invoice(BaseModel):
account_id: int
currency: str = "USD"
amount_cents: int