jsonschema-typed-v2
Automatic type annotations from JSON schemas
Decision gist · record as of 2026-08-14
Yes, if you actively use JSON Schema and want static type checking without manually writing TypedDict classes. The low install friction and permissive license make adoption easy. However, maintenance is dormant (last release 2020-08-11), and the package depends on mypy's unstable plugin API—newer mypy versions may break it without warning. Suitable for stable projects where you control mypy versions; risky for codebases that auto-upgrade dependencies.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires mypy plugin system integration via mypy.ini configuration and disabling mypy cache.
- mypy plugin API has no backwards compatibility guarantee, so future mypy versions may break this package.
- Low friction—pure Python wheel with only jsonschema and mypy as runtime dependencies.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source contexts.
last release 2020-08-11 (2194 days) · last repo commit 2023-10-03 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 172,461 downloads/mo, #10,337 on PyPI
Alternatives
Verify before relying
pip install jsonschema-typed-v2
# In mypy.ini:
# [mypy]
# plugins = jsonschema_typed.plugin, jsonschema_typed.optional_typed_dict
# cache_dir = /dev/null
from jsonschema_typed import JSONSchema
data: JSONSchema["path/to/schema.json"] = {"title": "example"}- Whether current mypy versions (post-0.761) are supported; the fact sheet mentions testing only with mypy==0.761.
- Whether the package works with modern Python 3.11+ or only up to 3.8 as classifiers suggest.
- Scope of JSON Schema features actually supported beyond the basic types listed (draft-07 compliance level).
What it is and what it does
jsonschema-typed-v2 bridges JSON Schema and Python's type system by converting JSON Schema definitions into TypedDict annotations that mypy can understand. When you annotate a variable with JSONSchema["path/to/schema.json"], the package's mypy plugin intercepts the type and generates a TypedDict matching the schema's structure—translating JSON types (string, number, boolean, array, object) into Python equivalents and marking required vs. optional fields. This lets you catch type errors in JSON-shaped data at static-check time rather than runtime.
The package is a maintained fork of an earlier abandoned project. It depends on jsonschema for schema parsing and mypy for the plugin infrastructure. Most JSON Schema concepts map straightforwardly to Python types, though some (like additionalProperties and self-references) have known limitations. Configuration requires enabling the plugin in mypy.ini and disabling mypy's cache due to how type hints are generated.
Use it for
- Validate API request/response payloads against a JSON Schema while getting IDE autocomplete and type errors during development.
- Ensure configuration files loaded from JSON match an expected schema without writing manual TypedDict classes.
- Catch typos in JSON object keys and type mismatches in data pipelines before runtime.
- Generate type stubs for dynamically loaded JSON data in data processing or ETL workflows.
- Enforce schema compliance in test fixtures and mock data without duplicating type definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you actively use JSON Schema and want static type checking without manually writing TypedDict classes.
The low install friction and permissive license make adoption easy. However, maintenance is dormant (last release 2020-08-11), and the package depends on mypy's unstable plugin API—newer mypy versions may break it without warning. Suitable for stable projects where you control mypy versions; risky for codebases that auto-upgrade dependencies.
Install
jsonschema-typed-v2 on PyPI
Before you install
Low friction—pure Python wheel with only jsonschema and mypy as runtime dependencies. However, maintenance is dormant: last release was 2020-08-11 and last commit 2023-10-03. The package is a maintained fork of an abandoned original, so stability depends on whether the current maintainer continues to support mypy plugin API changes.
Requires mypy plugin system integration via mypy.ini configuration and disabling mypy cache. mypy plugin API has no backwards compatibility guarantee, so future mypy versions may break this package.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source contexts.
Quickstart
pip install jsonschema-typed-v2
# In mypy.ini:
# [mypy]
# plugins = jsonschema_typed.plugin, jsonschema_typed.optional_typed_dict
# cache_dir = /dev/null
from jsonschema_typed import JSONSchema
data: JSONSchema["path/to/schema.json"] = {"title": "example"}
Verify before relying
- Whether current mypy versions (post-0.761) are supported; the fact sheet mentions testing only with mypy==0.761.
- Whether the package works with modern Python 3.11+ or only up to 3.8 as classifiers suggest.
- Scope of JSON Schema features actually supported beyond the basic types listed (draft-07 compliance level).
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesjsonschemamypy |
| Maintenance | Dormant 2,194 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 172,461 / month, #10,337 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Code GeneratorsTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTyping :: Typed |
Evidence: jsonschema_typed_v2-0.8.0-py3-none-any.whl
Tags
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 › “automatic type annotations from json”
- jsonschema-typed-v2Generates Python TypedDict type annotations automatically from JSON…
- WSMEWSME simplifies REST API development by letting you define web…
- undictifyEnforces type annotations at runtime by wrapping function calls and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also marshmallow-jsonschema · jsonschema-pydantic · jsonschema · jsonschema-specifications · genson · json-ref-dict · sentry-kafka-schemas · hypothesis-jsonschema · jsonschema-gentypes · jsonalias