jsonschema-pydantic
Convert JSON Schemas to Pydantic models
What it is and what it does
jsonschema-pydantic is a lightweight utility that takes a JSON Schema object and generates a Pydantic model class from it. It handles common schema patterns—primitive types, objects, arrays, nesting, optional fields, and defaults—and outputs a ready-to-use Pydantic model for data validation. The package sits between schema definition and model instantiation, eliminating the need to hand-write Pydantic classes when you already have a schema.
The package depends only on pydantic and installs with no friction. However, it is dormant: the last commit was in February 2024, and there have been no releases or updates since. If you need active maintenance, bug fixes, or support for newer Pydantic versions or advanced schema features, this package may not be a reliable choice.
Use it for:
- Generate Pydantic models from OpenAPI or JSON Schema specifications without manual class definition.
- Automate model creation in code-generation pipelines where schemas are the source of truth.
- Quickly prototype data validation layers when you have a schema but no corresponding Python types.
- Convert third-party JSON Schemas into Pydantic models for local validation and type safety.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts JSON Schema definitions into Pydantic model classes, enabling you to generate type-safe data validation models directly from schema specifications.
Yes, if you have a specific need to convert JSON Schemas to Pydantic models and can tolerate dormant maintenance. The package is simple, has low install friction, and carries no known vulnerabilities. However, verify Python and Pydantic version compatibility first, and be aware that no active support is available. Not recommended if you need ongoing updates or rely on cutting-edge Pydantic features.
Install
jsonschema-pydantic on PyPI
pip
pip install jsonschema-pydanticuv
uv add jsonschema-pydanticpoetry
poetry add jsonschema-pydanticInstalling jsonschema-pydantic
Before you install
Low friction install with a single runtime dependency on pydantic. Maintenance is dormant—last release was 2024-02-03 and no commits since 2024-02-05, so expect no active support or updates.
License in practice
License status is unclear; the package metadata does not declare an SPDX license or raw license text, so you cannot verify the legal terms before use.
Quickstart
pip install jsonschema-pydantic
from jsonschema_pydantic import jsonschema_to_pydantic
jsonschema = {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}
pydantic_model = jsonschema_to_pydantic(jsonschema)
Verify before relying
- Python version compatibility is unspecified; unclear which Python versions are actually supported.
- Scope of jsonschema feature coverage beyond the documented list (primitive types, objects, arrays, nested objects, optional fields, default values).
- Whether the generated Pydantic models work with current Pydantic v2 or are limited to v1.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pydantic |
| Maintenance | dormant — 923 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 202,100/month — #9,653 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsonschema_pydantic-0.6-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
django-pydantic-fieldProvides type-safe Pydantic model schemas for…
permissive · top 5,000 on PyPI
jsoncompatChecks whether evolving JSON Schemas remain…
unclear · top 15,000 on PyPI
jsonschema-pydantic-converterConverts JSON Schema definitions to Pydantic v2…
permissive · top 15,000 on PyPI
pydantic_corepydantic-core provides the high-performance…
permissive · top 100 on PyPI
jsonschema-typed-v2Generates Python TypedDict type annotations…
permissive · top 15,000 on PyPI
pydantic-sparkConverts Pydantic class definitions to Apache…
permissive · top 15,000 on PyPI
dydanticDynamically generates Pydantic models from JSON…
permissive · top 5,000 on PyPI
ibm-quantum-schemasProvides Pydantic models that define the…
permissive · top 15,000 on PyPI
eidoValidates project metadata against PEP schemas…
permissive · top 15,000 on PyPI
marshmallow-jsonschemaConverts marshmallow schemas into JSON Schema…
permissive · top 5,000 on PyPI