Contents

pydantic 2.12.5

0

Data validation using Python type hints

Data validation using Python type hints

Stars: 26829, Watchers: 26829, Forks: 2440, Open Issues: 550

The pydantic/pydantic repo was created 8 years ago and the last code push was 20 hours ago.
The project is extremely popular with a mindblowing 26829 github stars!

How to Install pydantic

You can install pydantic using pip

pip install pydantic

or add it to a project with poetry

poetry add pydantic

Package Details

Author
None
License
None
Homepage
None
PyPi:
https://pypi.org/project/pydantic/
Documentation:
https://docs.pydantic.dev
GitHub Repo:
https://github.com/samuelcolvin/pydantic

Classifiers

  • Internet
  • Software Development/Libraries/Python Modules
No  pydantic  pypi packages just yet.

Errors

A list of common pydantic errors.

Code Examples

Here are some pydantic code examples and snippets.

  • beanie code example from docs

    The following beanie code example shows how the library works by first defining two pydantic classes and then save a record to the database and retreiving a record. beanie utilizes pydantic and `motor`` to provide an asyncronys ODM for mongodb.

GitHub Issues

The pydantic package has 550 open issues on GitHub

  • Publish wheels for Android and iOS on PyPI
  • Add more version directives in documentation
  • Incorrect Pydantic dataclass constructor signature when using kw_only=True in decorator and pydantic.Field(kw_only=False)
  • Use typing.Union when replacing types under Python 3.14
  • TypeError: unsupported operand type(s) for |: 'str' and 'type' with forward reference and python 3.14
  • fix: use validator name instead of tag in tagged union error location
  • Issue when calling wrap validator handler twice and using model's __init__()
  • Better document BaseModel.__pydantic_generic_metadata__
  • Add fraction type
  • Add riscv64 build target for manylinux
  • Build riscv64 wheel builds for pydantic-core
  • Extract type arguments used to specialize generic models at run-time
  • model_validate_strings() does not respect custom __init__()
  • model_validate_strings() for complex types
  • Improve logic around ImportString validation when the ImportError originates from another source

See more issues on GitHub

Related Packages & Articles

fastapi 0.129.0

FastAPI framework, high performance, easy to learn, fast to code, ready for production

apispec 6.9.0

A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification).