Contents

pydantic 2.7.1

0

Data validation using Python type hints

Data validation using Python type hints

Stars: 18913, Watchers: 18913, Forks: 1662, Open Issues: 415

The pydantic/pydantic repo was created 7 years ago and the last code push was 7 hours ago.
The project is extremely popular with a mindblowing 18913 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 415 open issues on GitHub

  • build(deps): bump pre-commit from 2.16.0 to 2.17.0
  • build(deps): bump mkdocs-material from 8.1.3 to 8.1.8
  • avoid deepcopying object default
  • Fix pytest crashes with hypothesis and pydantic
  • New type StrLimited
  • Fixed docs about custom encoders
  • Added abstract SecretField class for secret fields
  • Pylance reports problem in match-case statement (PEP 634) with dataclasses
  • Add Robusta.dev to list of Pydantic users
  • ValueError raised when Nested Discriminated Unions are used twice
  • Fix issue with self-referencing dataclass
  • Linting error when using nested models with optional arguments
  • Equatable base dataclasses become inequatable when used as BaseModel fields
  • build(deps): bump hypothesis from 6.31.6 to 6.36.0
  • Prevent subclasses of bytes being converted to bytes

See more issues on GitHub

Related Packages & Articles

fastapi 0.111.0

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

apispec 6.6.1

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