Pydantic

First, we built a data validation library that developers love.

Next, we're building cloud services that developers will love.

Pydantic

Pydantic is the most widely used data validation library for Python.

It's downloaded millions of times a day by thousands of developers all over the world.

Pydantic's success stems from its great developer experience - simple to use, even when doing complex things.

from datetime import datetime
from pydantic import BaseModel


class User(BaseModel):
    id: int
    name: str
    signup_ts: datetime | None
    friends: list[int]


user = User(**external_data)

Learn more from Pydantic Documentation.

Pydantic V2

In June 2023, Pydantic V2 was released as a major update to Pydantic.

  • With validation and serialisation logic implemented in Rust, V2 is 5-50x faster than V1 (which was already fast)!
  • The long-awaited "strict mode" allows complete control over data coercion.
  • Composable validators give the full power of Pydantic in even more scenarios.

Hundreds of other fixes and improvements further support Pydantic as the canonical way of working with real world data in Python.

Pydantic V1
[█░░░░░░░░░░░░░░░░░░░░░░░░░░░]
3,664 iter/s


Pydantic V2
[███████████████████████░░░░░]
97,847 iter/s

Pydantic Inc.

Based on the same principles that have made Pydantic so successful, the creator of Pydantic, Samuel Colvin, has started a company to bring the same quality of developer experience to other domains.

1950s tractor

Learn more from the Company Announcement and Company Roadmap.