Description
# Pydantic Validation [](https://github.com/pydantic/pydantic/actions?query=event%3Apush+branch%3Amain+workflow%3ACI) [](https://coverage-badge.samuelcolvin.workers.dev/redirect/pydantic/pydantic) [](https://pypi.python.org/pypi/pydantic) [](https://anaconda.org/conda-forge/pydantic) [](https://pepy.tech/project/pydantic) [](https://github.com/pydantic/pydantic) [](https://github.com/pydantic/pydantic/blob/main/LICENSE) [](https://docs.pydantic.dev/latest/contributing/#badges) [](https://docs.pydantic.dev/latest/llms.txt) 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.9+; validate it with Pydantic. ## Pydantic Logfire :fire: We've launched Pydantic Logfire to help you monitor your applications. [Learn more](https://pydantic.dev/logfire/?utm_source=pydantic_validation) ## 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](https://docs.pydantic.dev/) or, [`1.10.X-fixes` git branch](https://github.com/pydantic/pydantic/tree/1.10.X-fixes). 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](https://docs.pydantic.dev/) 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](https://docs.pydantic.dev/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](https://docs.pydantic.dev/contributing/). ## Reporting a Security Vulnerability See our [security policy](https://github.com/pydantic/pydantic/security/policy). ## Changelog <!-- markdownlint-disable no-bare-urls --> <!-- markdownlint-disable descriptive-link-text --> <!-- markdownlint-disable-next-line first-line-heading --> ## v2.13.3 (2026-04-20) [GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.13.3) ### What's Changed #### Fixes * Handle `AttributeError` subclasses with `from_attributes` by [@Viicos](https://github.com/Viicos) in [#13096](https://github.com/pydantic/pydantic/pull/13096) ## v2.13.2 (2026-04-17) [GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.13.2) ### What's Changed #### Fixes * Fix `ValidationInfo.field_name` missing with `model_validate_json()` by [@Viicos](https://github.com/Viicos) in [#13084](https://github.com/pydantic/pydantic/pull/13084) ## v2.13.1 (2026-04-15) [GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.13.1) ### What's Changed #### Fixes * Fix `ValidationInfo.data` missing with `model_validate_json()` by [@davidhewitt](https://github.com/davidhewitt) in [#13079](https://github.com/pydantic/pydantic/pull/13079) ## v2.13.0 (2026-04-13) [GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.13.0) The highlights of the v2.13 release are available in the [blog post](https://pydantic.dev/articles/pydantic-v2-13-release). Several minor changes (considered non-breaking changes according to our [versioning policy](https://pydantic.dev/docs/validation/2.13/get-started/version-policy/#pydantic-v2)) are also included in this release. Make sure to look into them before upgrading. This release contains the updated `pydantic.v1` namespace, matching version 1.10.26 which includes support for Python 3.14. ### What's
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 2.13.3 | Imported from PyPI (2.13.3) | Low | 4/21/2026 |
