skillfed

jsonschema-pydantic

Convert JSON Schemas to Pydantic models

jsonschema-pydantic v0.6 202.1K downloads/30d#9,653 on PyPI22
License unclear DORMANT released

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-pydantic

uv

uv add jsonschema-pydantic

poetry

poetry add jsonschema-pydantic

Installing 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

json schema to pydanticjsonschema pydantic conversiongenerate pydantic models from schemaschema to model generatorpydantic model factoryjson schema validator
schema-generationpydantic-tooling

More Software Development packages