--- id: dataclasses-jsonschema version: "2.16.0" license: MIT license_treatment: permissive maintenance: abandoned --- # dataclasses-jsonschema — JSON schema generation from dataclasses License: permissive · Maintenance: abandoned · Downloads: 196.2K/mo ## What it is and what it does Dataclasses-jsonschema is a lightweight library that converts Python 3.7+ dataclasses into JSON Schema definitions. It generates schemas compatible with draft-04, draft-06, Swagger 2.0, and OpenAPI 3 formats, and provides methods to serialize dataclass instances to dictionaries, deserialize dictionaries back into dataclass instances, and validate data against the generated schema. The library is designed as a lighter-weight alternative to marshmallow and pydantic, requiring only dataclasses, jsonschema, python-dateutil, and typing-extensions as runtime dependencies. It includes optional extras for performance improvements (fastjsonschema for validation, fastuuid for UUID handling, ciso8601 for date parsing) and integrates with apispec for automatic OpenAPI/Swagger documentation generation. However, the project entered maintenance mode and is no longer actively developed, with the repository archived since August 2023. Use it for: - Generate OpenAPI/Swagger documentation automatically from dataclass definitions in Flask or other web frameworks - Validate incoming JSON data against a schema derived from a dataclass structure before processing - Serialize and deserialize dataclass instances to/from JSON with built-in type checking - Create reusable schema definitions for APIs without writing JSON Schema by hand ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates JSON Schema from Python dataclasses and provides serialization, deserialization, and validation against the generated schema. Yes, with conditions. The package is stable and has low install friction, but the abandoned maintenance status (last release October 2022, repository archived August 2023) means no active support for emerging Python versions or security issues. Install if your schema generation needs are straightforward and you do not require ongoing maintenance; consider pydantic or marshmallow if you need active development or broader feature coverage. ## Install pip install dataclasses-jsonschema uv add dataclasses-jsonschema poetry add dataclasses-jsonschema ## Installing dataclasses-jsonschema Before you install: Low install friction with a pure-Python wheel. The project is in maintenance mode with only urgent bugfixes; the repository was archived after the last commit in 2023-08-19, over 1387 days ago. License in practice: MIT license is permissive and imposes no significant restrictions on use or redistribution. Quickstart: from dataclasses import dataclass from dataclasses_jsonschema import JsonSchemaMixin @dataclass class Point(JsonSchemaMixin): x: float y: float Point.json_schema() # Returns schema dict Point(x=3.5, y=10.1).to_dict() # Serialize Point.from_dict({'x': 3.14, 'y': 1.5}) # Deserialize Verify before relying: - Whether maintenance-mode status and 1387-day gap since last release poses compatibility risks with modern Python versions - Performance characteristics compared to actively maintained alternatives like pydantic ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 196.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags json schema from dataclasses, dataclass serialization deserialization, json validation python, openapi swagger schema generation, dataclass to json schema, schema-generation, dataclass-tooling, api-documentation [View on SkillFed](https://skillfed.io/packages/dataclasses-jsonschema) · [View on PyPI](https://pypi.org/project/dataclasses-jsonschema/)