OSS Tanbou

connect Python type hints to runtime data validation

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
28,908
Primary language
Python
License
MIT
Repository last updated
Sep 29, 2026
On this page

Overview

Pydantic uses Python type hints to validate input, coerce values, serialize models, and generate JSON Schema. BaseModel provides a typed boundary between external data and application code.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Validate inputs into typed BaseModel instances

Field annotations drive validation and conversion from dictionaries, JSON, and other external inputs.

Sources: [2]

Reuse models for serialization and JSON Schema

The same model definitions can drive output serialization and schema generation.

Sources: [2]

Best fit

Fits API, configuration, and structured-data boundaries

It is useful when loosely typed or untrusted inputs should be checked before entering application logic.

Sources: [2]

Before adoption

Pydantic v2 differs materially from v1

Existing v1 projects should review migration changes around validators, serialization, and configuration.

Sources: [2]

Verify dependency compatibility with 2.13.5

Frameworks and plugins may pin a Pydantic major version, so confirm compatibility before upgrading.

Sources: [3][2]

Official sources

  1. [1]pydantic/pydantic repository(2026-09-30)
  2. [2]Pydantic documentation(2026-09-30)
  3. [3]Pydantic v2.13.5 release(2026-09-30)
Supplemental curator note

Pydantic connects Python type hints to runtime validation and typed models. It is useful at input boundaries such as APIs, configuration, and structured data pipelines.

Try it in 3 steps

  1. 1

    Install Pydantic 2.13.5

    Pin the release in a virtual environment.

    python -m pip install "pydantic==2.13.5"
  2. 2

    Define a BaseModel

    Define the input schema using Python type hints.

    from pydantic import BaseModel class User(BaseModel): id: int name: str
  3. 3

    Validate input data

    Validate and convert external input into a typed model instance.

    user = User.model_validate({"id": "1", "name": "Ada"})
Check the official README

Growth

Growth trends · Last 30 days

28,908 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • hints
  • json-schema
  • parsing
  • pydantic
  • python
  • python310
  • python311
  • python312
  • python313
  • python39
  • validation
Stars
28,908
Forks
3,002
Watchers
180
Open issues
588
Owner type
Organization
Primary language
Python
License
MIT
Repository last updated
Sep 29, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?