Installation is as simple as:
pip install pydantic
pydantic has no required dependencies except python 3.6 or 3.7 (and the dataclasses package in python 3.6).
If you've got python 3.6 and
pip installed, you're good to go.
conda install pydantic -c conda-forge
pydantic can optionally be compiled with cython which should give a 30-50% performance
manylinux binaries exist for python 3.6 and 3.7, so if you're installing from PyPI on linux, you
should get a compiled version of pydantic with no extra work. If you're installing manually, install
before installing pydantic and compilation should happen automatically. Compilation with cython
is not tested on windows or mac.
To test if pydantic is compiled run:
import pydantic print('compiled:', pydantic.compiled)
pip install pydantic[email] # or pip install pydantic[typing_extensions] # or just pip install pydantic[email,typing_extensions]
Of course, you can also install these requirements manually with
pip install email-validator and/or
pip install typing_extensions.
And if you prefer to install pydantic directly from the repository:
pip install git+git://github.com/samuelcolvin/pydantic@master#egg=pydantic # or with extras pip install git+git://github.com/samuelcolvin/pydantic@master#egg=pydantic[email,typing_extensions]