$npx skillfedfor your agent

jsonschema-gentypes

Tool to generate Python types based on TypedDict from a JSON Schema

Worth itPyPI Code GeneratorsReleased Nov 202575.4K downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — jsonschema_gentypes-2.13.0-py3-none-any.whl
v2.13.0 · released 2025-11-26 · Python >=3.10 · 6 runtime deps: PyYAML, jsonschema, referencing, requests, typing-extensions, urllib3

Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and solves a real problem for teams using schema-first API design. Install friction is low and it integrates well into existing workflows via CLI, config files, and pre-commit hooks. Suitable for production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later (supports 3.10, 3.11, 3.12, 3.13).
  • Low friction: pure Python wheel with six common runtime dependencies (PyYAML, jsonschema, referencing, requests, typing-extensions, urllib3).
  • Actively maintained with recent release and no known vulnerabilities.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you can use this in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.

last release 2025-11-26 (261 days) · last repo commit 2026-08-14 · 48 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 75,436 downloads/mo, #14,714 on PyPI

Verify before relying

pip install jsonschema-gentypes

jsonschema-gentypes --json-schema=schema.json --python=types.py

# Or via config file (jsonschema-gentypes.yaml):
jsonschema-gentypes
  • Whether generated types are fully compatible with runtime type checkers like mypy and pyright in all schema patterns.
  • Performance characteristics when processing very large or deeply nested JSON schemas.
  • Completeness of OpenAPI3 support relative to the full OpenAPI3 specification.
Same gist for agents: .md · .json

What it is and what it does

jsonschema-gentypes is a command-line tool that reads JSON Schema files and generates Python source code containing TypedDict type definitions. It bridges the gap between schema-first API design and Python's static type system, letting you define your data contracts once in JSON Schema and automatically produce typed Python code that can be validated against those schemas.

The tool supports both standard JSON Schema and OpenAPI3 schemas, automatically detecting which format you're using. It integrates with code formatters like black and isort, can be run as a pre-commit hook, and exports default values from the schema so you can use them in your Python code. It requires Python 3.10 or later and depends on jsonschema, PyYAML, requests, referencing, typing-extensions, and urllib3.

Use it for

  • Generate type-safe request/response models from an OpenAPI3 specification for use in web frameworks like Pyramid or FastAPI.
  • Maintain a single JSON Schema as the source of truth for data validation while keeping Python types automatically in sync.
  • Integrate schema-driven code generation into CI/CD pipelines via pre-commit hooks to catch type mismatches early.
  • Build strongly-typed data validation layers in microservices without manually writing TypedDict classes.
  • Generate Python types from shared JSON Schema definitions across multiple services or repositories.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, uses a permissive license, and solves a real problem for teams using schema-first API design. Install friction is low and it integrates well into existing workflows via CLI, config files, and pre-commit hooks. Suitable for production use.

Install

jsonschema-gentypes on PyPI

Before you install

Low friction: pure Python wheel with six common runtime dependencies (PyYAML, jsonschema, referencing, requests, typing-extensions, urllib3). Actively maintained with recent release and no known vulnerabilities.

Requires Python 3.10 or later (supports 3.10, 3.11, 3.12, 3.13).

License in practice

BSD-2-Clause is permissive; you can use this in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.

Quickstart

pip install jsonschema-gentypes

jsonschema-gentypes --json-schema=schema.json --python=types.py

# Or via config file (jsonschema-gentypes.yaml):
jsonschema-gentypes

Verify before relying

  • Whether generated types are fully compatible with runtime type checkers like mypy and pyright in all schema patterns.
  • Performance characteristics when processing very large or deeply nested JSON schemas.
  • Completeness of OpenAPI3 support relative to the full OpenAPI3 specification.

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
PyYAMLjsonschemareferencingrequeststyping-extensionsurllib3
MaintenanceActively maintained 261 days since the last release
Last repo commit
First released
Downloads75,436 / month, #14,714 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Code GeneratorsTyping :: Typed

Evidence: jsonschema_gentypes-2.13.0-py3-none-any.whl

Tags

Capabilities
json schema to python typestypeddict generatorjson schema code generationopenapi3 python typesschema-driven type generationjson schema validation typesautomatic python type stubs
Topics
code-generationschema-driventype-safety
PyPI keywords
jsonschematypes

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “json schema to python types”

Give your agent the search over MCP, or paste the wish link into any chat.

More Code Generators packages

proto-plus Worth it
PyPI · Python Modules · released Aug 2026

Proto Plus wraps protocol buffers to provide Python classes that behave like native Python types while maintaining protocol buffer serialization and schema validation.

Install it if you're working with protocol buffers in Python and want a more Pythonic interface, or if you're using Google Cloud libraries that depend on it.

Apache-2.0pure Python · 3.10+
343.8Mdownloads / mo
Cython Worth it
PyPI · Python Modules · released Jul 2026

Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.

Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.

permissive licensepure Python · 3.8+
136.1Mdownloads / mo
asttokens Worth it
PyPI · Python Modules · released Jul 2026

Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.

permissive licensepure Python · 3.8+
134.8Mdownloads / mo
beartype Worth it
PyPI · Python Modules · released Dec 2025

Beartype is a runtime type checker that validates Python type hints at function call time, catching type violations before they cause downstream bugs.

Install it if you want runtime type safety for your annotated code or need to validate type hints on third-party packages.

MITpure Python · 3.10+
99.1Mdownloads / mo
llvmlite With conditions
PyPI · Code Generators · released Aug 2026

llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.

BSD-2-Clause AND Apache-2.0 WITH LLVM-exceptioncompiled wheel · 3.10+
69.3Mdownloads / mo
astor Worth it
PyPI · Code Generators · released Dec 2019

astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.

Install it if you need AST round-tripping or advanced tree inspection.

BSD-3-Clausepure Python
20.0Mdownloads / mo

See also check-jsonschema · datamodel-code-generator · marshmallow-jsonschema · jsonschema-pydantic · jschema-to-python · jsonschema-typed-v2 · dydantic · openapi-schema-pydantic · json-ref-dict · shrub.py