skillfed

jschema-to-python

Generate source code for Python classes from a JSON schema.

jschema-to-python v1.2.3 2.7M downloads/30d#2,933 on PyPI39
Permissive license MIT Abandoned released

What it is and what it does

jschema-to-python is a command-line code generator that reads a JSON schema file and produces Python class definitions matching that schema's structure. It uses attrs, jsonpickle, and pbr as runtime dependencies to support the generated code. The tool accepts a schema path, output directory, and root class name, with optional hints files to control code generation behavior.

The package is positioned as a bridge between schema-first API design and Python development—useful when you have a JSON schema and want corresponding Python dataclasses without writing them by hand. However, it has been abandoned since late 2022 with no active maintenance, meaning it will not receive updates for Python version changes, dependency conflicts, or bug fixes.

Use it for:

  • Generate Python models from OpenAPI or JSON Schema specifications for API client libraries.
  • Automate boilerplate class creation when working with schema-driven microservices.
  • Convert external JSON schema definitions into Python code for data validation and serialization.
  • Bootstrap Python projects that consume or validate JSON data against a known schema.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates Python class definitions from JSON schema files, converting schema structure into typed Python code via command-line tool.

No—install only if you are locked into an older Python environment and have no alternative. The package is abandoned with no maintenance since 2022, no releases since 2019, and no guarantee of compatibility with modern Python. For new projects, use maintained alternatives like dataclasses-json, pydantic, or marshmallow-jsonschema instead.

Install

jschema-to-python on PyPI

pip

pip install jschema-to-python

uv

uv add jschema-to-python

poetry

poetry add jschema-to-python

Installing jschema-to-python

Before you install

Low install friction with three straightforward runtime dependencies. However, the package is abandoned—last commit was 2022-10-25 and no releases since 2019-10-05. No active maintenance means bugs and compatibility issues will not be addressed.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute this code freely as long as you include the license notice.

Quickstart

pip install jschema-to-python
python -m jschema_to_python -s schema.json -o output_dir -r RootClass

Requires Python >= 2.7; the package targets older Python versions and may have compatibility issues with modern Python releases.

Verify before relying

  • Whether the generated code works correctly with current Python versions (3.10+) given the last release was 2019.
  • Whether the three runtime dependencies (attrs, jsonpickle, pbr) have themselves aged or introduced breaking changes.
  • Real-world success rate for complex or nested JSON schemas beyond basic use cases.

Package facts

License MIT (permissive)
Python support supports the current Python release (>= 2.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — attrs, jsonpickle, pbr
Maintenance abandoned — 2,505 days since the last release
Last repo commit
First released
Downloads 2,706,189/month — #2,933 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jschema_to_python-1.2.3-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python Modules

Tags

json schema to python classesgenerate python from json schemajson schema code generatorschema-driven python modelsjson schema python codegen
code-generationabandoned

More Python Modules packages