hologram
JSON schema generation from dataclasses
What it is and what it does
Hologram is a lightweight library that automatically generates JSON Schemas (Draft 7 compatible) from Python dataclasses. It eliminates the need to write schemas by hand by inspecting your dataclass definitions and producing valid JSON Schema output. The library depends on python-dateutil, jsonschema, and dataclasses (the latter being built-in for Python 3.7+).
The package is designed for developers who want to keep their data models and their schemas in sync without duplication. It's a fork of dataclasses-jsonschema and targets Python 3.6 through 3.9 according to its classifiers. With no known security vulnerabilities and a permissive MIT license, it's straightforward to integrate into existing projects, though the aging maintenance status means it may not receive updates for newer Python versions or JSON Schema specifications.
Use it for:
- Generate API request/response schemas automatically from dataclass definitions for FastAPI or Flask endpoints
- Create JSON Schema validation rules from dataclasses to validate incoming data without writing schemas separately
- Document data structures by exporting dataclass-derived schemas for API documentation or OpenAPI specs
- Ensure consistency between Python type definitions and their JSON representations in microservices
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates Draft 7 compatible JSON Schemas directly from Python 3.6+ dataclasses without manual schema writing.
Yes, if you are working with Python 3.6–3.9 and need automatic JSON Schema generation from dataclasses. The low install friction, permissive license, and zero known vulnerabilities make it safe to use. However, be cautious if you require support for Python 3.10+ or expect ongoing maintenance—the project has not been updated since March 2023 and is no longer actively developed.
Install
hologram on PyPI
pip
pip install hologramuv
uv add hologrampoetry
poetry add hologramInstalling hologram
Before you install
Low install friction with three common dependencies. Last release was in March 2023 with no commits since November 2025, indicating the project is aging but stable and not actively maintained.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install hologram
from dataclasses import dataclass
from hologram import JsonSchemaMixin
@dataclass
class Example(JsonSchemaMixin):
name: str
age: int
schema = Example.json_schema()
Verify before relying
- Whether the package still works reliably with Python 3.10+ given the last release predates those versions
- Whether Draft 7 schema output remains compatible with current JSON Schema validators and tooling
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — python-dateutil, jsonschema, dataclasses |
| Maintenance | aging — 1,239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,709,146/month — #3,628 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hologram-0.0.16-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
dataclasses-jsonschemaGenerates JSON Schema from Python dataclasses…
permissive · top 15,000 on PyPI
warchant_dc_schemaGenerates JSON Schema (2020-12 draft) from…
permissive · top 15,000 on PyPI
dataclasses-avroschemaGenerates Avro schemas from Python dataclasses,…
permissive · top 5,000 on PyPI
dataclasses-jsonConverts Python dataclasses to and from JSON…
permissive · top 1,000 on PyPI
desertDesert generates marshmallow serialization…
permissive · top 15,000 on PyPI
py-avro-schemaGenerates Apache Avro schemas from Python…
permissive · top 15,000 on PyPI
dataclass-wizardDataclass Wizard converts Python dataclasses to…
permissive · top 5,000 on PyPI
dataclass-factoryConverts dataclasses to and from dictionaries…
permissive · top 15,000 on PyPI
djangorestframework-dataclassesAutomatically generates Django REST Framework…
permissive · top 5,000 on PyPI
apischemaApischema handles JSON…
permissive · top 15,000 on PyPI