pydantic
PyPIv2.13.5Data validation using Python type hints
Not recommended for new projects
No — pydantic should not be adopted for new projects. No license declared — you have no explicit right to use this code.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 12 days ago. 50 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 4 transitive packages, about 534 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package lists no maintainer.
- FLicense: grade F, Failing.
No license declared — you have no explicit right to use this code.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding pydantic to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Compatibility
- Python
- python >=3.9
Quick start
A usage example from the pydantic README.
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]Dependencies
Declared by pydantic v2.13.5. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (4)
Used by
Popular packages that depend on pydantic.
Relationship graph
Dependencies (left) and dependents (right) of pydantic.
Frequently installed together
The little ASGI library that shines.
Backported and Experimental Type Hints for Python 3.9+
Runtime typing introspection tools
Document parameters, class attributes, return types, and variables inline, with Annotated.
Release history
45 releases in the last two years, typically about 13 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.13.5latest | 12 days ago | 462 KB | — |
| 2.14.0b1 | 1 month ago | 467 KB | — |
| 2.14.0a1 | 3 months ago | 459 KB | — |
| 2.13.4 | 4 months ago | 461 KB | — |
| 2.13.3 | 4 months ago | 461 KB | — |
| 2.13.2 | 4 months ago | 461 KB | — |
| 2.13.1 | 4 months ago | 461 KB | — |
| 2.13.0 | 4 months ago | 461 KB | — |
| 2.13.0b3 | 5 months ago | 460 KB | — |
| 2.13.0b2 | 6 months ago | 457 KB | — |
| 2.13.0b1 | 6 months ago | 457 KB | — |
| 1.10.26 | 8 months ago | 2.3 MB | — |
| 1.10.25 | 8 months ago | 2.3 MB | — |
| 2.12.5 | 9 months ago | 453 KB | — |
| 2.12.4 | 10 months ago | 453 KB | — |
Overview
pydantic is an PyPI package that data validation using Python type hints. It has 1 known dependents in the graph. The latest version is 2.13.5.
Who should use it
Teams working in the PyPI ecosystem who need data validation using Python type hints and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your PyPI stack.
Pros
- Actively published to the registry.
Cons
- No license detected — review usage terms before adopting.
Auto-generated from collected registry metadata. No external claims are inferred.
Funding
Frequently asked questions
Should I use pydantic?
No — pydantic should not be adopted for new projects. No license declared — you have no explicit right to use this code.
How do I install pydantic?
Run `pip install pydantic` to add pydantic to your PyPI project.
How many dependencies does pydantic have?
pydantic declares 4 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 534 KB on disk.
What license is pydantic released under?
No license was detected in pydantic's metadata; review the repository before use.
How popular is pydantic?
PyPI does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on pydantic.
Is pydantic still maintained?
The most recent release of pydantic (v2.13.5) was published 12 days ago.