skillfed

hologram

JSON schema generation from dataclasses

hologram v0.0.16 1.7M downloads/30d#3,628 on PyPI10
Permissive license MIT AGING released

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 hologram

uv

uv add hologram

poetry

poetry add hologram

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

json schema from dataclassesdataclass to json schemapython schema generationdraft 7 schema generatorautomatic json schema
schema-generationdataclass-tooling

More Libraries packages