drf-jsonschema-serializer
JSON Schema support for Django REST Framework
What it is and what it does
drf-jsonschema-serializer bridges Django REST Framework serializers and JSON Schema, allowing you to use the same validation rules on both client and server. It provides a converter that turns a DRF serializer into a JSON Schema representation, and field types that validate incoming JSON data against a schema or serializer definition. This is useful when you want to generate client-side forms dynamically from your server-side serializer definitions, or when you need to accept and validate arbitrary JSON payloads that conform to a known schema.
The package depends on django, djangorestframework, and jsonschema. It is stable (Production/Stable status) and supports Python 3.10, 3.11, and 3.12. Maintenance has slowed—the last release was 779 days ago—but the repository remains open and not archived, suggesting it is suitable for projects that do not require frequent updates.
Use it for:
- Generate web forms dynamically from DRF serializers using client-side libraries.
- Validate JSON payloads in REST endpoints against a predefined JSON Schema without custom logic.
- Accept flexible JSON structures in a single field while maintaining schema-based validation.
- Share validation rules between a Django backend and a frontend form library to keep them in sync.
- Build APIs that accept polymorphic or nested JSON data with schema-driven validation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Django REST Framework serializers to JSON Schema and provides fields to validate JSON data against schemas or serializers, enabling shared validation between client-side and server-side.
Yes, if you are building a Django REST API that needs to share schema-based validation with a client-side form library or accept flexible JSON payloads. The low install friction and permissive license make it a safe choice. However, the aging maintenance status (779 days since last release) means it is best suited to stable projects that do not require frequent updates or rapid bug fixes. Check that your versions of django and djangorestframework are compatible before adopting.
Install
drf-jsonschema-serializer on PyPI
pip
pip install drf-jsonschema-serializeruv
uv add drf-jsonschema-serializerpoetry
poetry add drf-jsonschema-serializerInstalling drf-jsonschema-serializer
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 779 days ago, though the repository remains active with a recent commit on 2025-05-14. Suitable for stable, established projects but not for rapid iteration.
License in practice
BSD license (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you retain the copyright notice and disclaimer.
Quickstart
pip install drf-jsonschema-serializer
from drf_jsonschema_serializer.fields import JSONSchemaField
class MySerializer:
data = JSONSchemaField(schema={"type": "object"})
Requires Python 3.10 or later; django, djangorestframework, and jsonschema must be installed.
Verify before relying
- Specific versions of django and djangorestframework supported beyond Django 4.2.
- Performance characteristics with large or deeply nested JSON schemas.
- Whether react-jsonschema-form integration is documented or requires custom glue code.
Package facts
| License | Copyright (c) 2017, ISProjects Copyright (c) 2023, Maykin Media All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — django, djangorestframework, jsonschema |
| Maintenance | aging — 779 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,495/month — #10,446 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: drf_jsonschema_serializer-3.0.0-py3-none-any.whl
Keywords: django, rest, polymorphic
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-typomaticGenerates TypeScript interfaces and enums from…
unclear · top 15,000 on PyPI
marshmallow-jsonschemaConverts marshmallow schemas into JSON Schema…
permissive · top 5,000 on PyPI
drf-recaptchaAdds reCAPTCHA v2 and v3 field validation to…
permissive · top 15,000 on PyPI
drf-dynamic-fieldsProvides a Django REST Framework mixin that…
permissive · top 15,000 on PyPI
sentry-kafka-schemasProvides Kafka topic definitions and JSON…
unclear · top 15,000 on PyPI
drf-pydanticBridges pydantic models and Django REST…
permissive · top 15,000 on PyPI
drf-exceptions-hogStandardizes Django REST Framework exception…
permissive · top 5,000 on PyPI
jsonschemajsonschema validates Python data structures…
permissive · top 100 on PyPI
voluptuous-serializeConverts Voluptuous schema objects into…
permissive · top 15,000 on PyPI
drf-standardized-errorsConverts all Django REST Framework API error…
permissive · top 15,000 on PyPI