warchant_dc_schema
Generate JSON schema from python dataclasses
Decision gist · record as of 2026-08-14
Yes, if you need lightweight JSON schema generation from dataclasses and want to avoid large dependencies. The zero-dependency design and standard-library-only approach make it easy to integrate. However, dormant maintenance (last commit 2024-02-13) means you should expect no active bug fixes or feature updates; use it for stable, self-contained schema generation tasks, not as a foundation for rapidly evolving systems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later (requires_python: >=3.9,<4.0).
- Low friction install with no runtime dependencies.
- Dormant maintenance status (last commit 2024-02-13, 913 days since release) means no active development, though the repository is not archived.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice.
last release 2024-02-13 (913 days) · last repo commit 2024-02-13 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 102,621 downloads/mo, #12,858 on PyPI
Alternatives
Verify before relying
pip install warchant-dc-schema
import dataclasses
from warchant_dc_schema import get_schema
@dataclasses.dataclass
class Book:
title: str
published: bool = False
schema = get_schema(Book)- Whether patternProperties and additionalProperties features (added in 0.0.9–0.0.10) are production-ready or experimental.
- Real-world validation performance compared to alternatives for large or deeply nested dataclass hierarchies.
- Whether the CLI tool is actively maintained or documented beyond the brief mention in the description.
What it is and what it does
warchant_dc_schema is a lightweight, zero-dependency library that converts Python dataclasses into valid JSON Schema (2020-12 draft) documents. It reads dataclass field types, defaults, and optional metadata annotations to produce schema output suitable for validation, documentation, or API specifications.
The package is designed as a minimal alternative when you only need schema generation from plain dataclasses. It supports nested dataclasses, optional fields, datetime types, and custom metadata via typing.Annotated. You can also customize dataclass-level schema properties using a SchemaConfig inner class. Recent versions add patternProperties and additionalProperties support. The library includes a CLI tool and a test suite demonstrating supported features.
Use it for
- Generate OpenAPI or JSON Schema documentation from dataclass-based API request/response models.
- Validate incoming JSON data against a schema derived from your dataclass definitions.
- Export dataclass structures as reusable schema files for cross-language API contracts.
- Add schema metadata (descriptions, examples, validation rules) to dataclasses without a full validation framework.
- Build lightweight schema-driven tools or code generators that operate on dataclass definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight JSON schema generation from dataclasses and want to avoid large dependencies.
The zero-dependency design and standard-library-only approach make it easy to integrate. However, dormant maintenance (last commit 2024-02-13) means you should expect no active bug fixes or feature updates; use it for stable, self-contained schema generation tasks, not as a foundation for rapidly evolving systems.
Install
warchant-dc-schema on PyPI
Before you install
Low friction install with no runtime dependencies. Dormant maintenance status (last commit 2024-02-13, 913 days since release) means no active development, though the repository is not archived.
Requires Python 3.9 or later (requires_python: >=3.9,<4.0).
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install warchant-dc-schema
import dataclasses
from warchant_dc_schema import get_schema
@dataclasses.dataclass
class Book:
title: str
published: bool = False
schema = get_schema(Book)
Verify before relying
- Whether patternProperties and additionalProperties features (added in 0.0.9–0.0.10) are production-ready or experimental.
- Real-world validation performance compared to alternatives for large or deeply nested dataclass hierarchies.
- Whether the CLI tool is actively maintained or documented beyond the brief mention in the description.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 913 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,621 / month, #12,858 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9 |
Evidence: warchant_dc_schema-0.0.10-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 › “json schema from dataclasses”
- warchant_dc_schemaGenerates JSON Schema (2020-12 draft) from Python dataclasses with no…
- hologramGenerates Draft 7 compatible JSON Schemas directly from Python 3.6+…
- dataclasses-jsonschemaGenerates JSON Schema from Python dataclasses and provides…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also genson · hologram · desert · dataclasses-jsonschema · dataclasses-avroschema · marshmallow-jsonschema · tinsel · apischema · ocsf-lib · pyion2json