Installation is as simple as:
pip install pydantic
Pydantic has a few dependencies:
pydantic-core: Core validation logic for pydantic written in rust.
typing-extensions: Backport of the standard library
annotated-types: Reusable constraint types to use with
If you've got Python 3.7+ and
pip installed, you're good to go.
conda install pydantic -c conda-forge
Pydantic has the following optional dependencies:
- If you require email validation, you can add email-validator.
To install optional dependencies along with Pydantic:
pip install pydantic[email]
Of course, you can also install requirements manually with
pip install email-validator.
Install from repository¶
And if you prefer to install Pydantic directly from the repository:
pip install git+https://github.com/pydantic/pydantic@main#egg=pydantic
# or with extras
pip install git+https://github.com/pydantic/pydantic@main#egg=pydantic[email]