Installation¶
Pydantic JSON Schema is available on PyPI as
pydantic-jsonschema, so installation is as
simple as:
(Requires Python 3.12+)
This installs the pydantic_jsonschema package, plus the core dependencies required to create and
validate generated models:
pydanticfor model creation and validation.openapi-pydanticfor JSON Schema types such asSchema,Reference, andDataType.
Optional dependencies¶
Pydantic JSON Schema has optional dependencies for format validation.
Use formats-base for standard JSON Schema formats such as email, hostname, URI, and IRI:
Use formats-extra for domain-specific formats such as payment cards, phone numbers, colors,
country codes, and MAC addresses:
To install both groups:
See Format Validators for supported formats and usage examples.
Install from repository¶
If you prefer to install directly from a repository checkout:
For local development, use the contributing guide instead. It is the source of
truth for development dependencies, just recipes, documentation checks, and PR workflow.
Next Steps¶
- Converters - Create Pydantic models from JSON Schema
- Format Validators - Add validation for JSON Schema
formatvalues - Examples - Run complete examples