djangorestframework-jsonapi
A Django REST framework API adapter for the JSON:API spec.
What it is and what it does
This package bridges Django REST framework and the JSON:API specification, transforming DRF's default response format into JSON:API-compliant output. Instead of a flat results array, it structures responses with typed data objects, relationships, links, and metadata according to the JSON:API standard. It handles automatic key inflection (converting Python snake_case to JSON:API hyphenated format), pagination, filtering, and relationship serialization out of the box.
You integrate it by adding it to INSTALLED_APPS, configuring DRF's REST_FRAMEWORK settings to use its parsers and renderers, and then your existing class-based views automatically produce JSON:API responses. It aims to stay compatible with DRF's design philosophy rather than working around it, and supports the current Django and Python release lines with sane defaults that require minimal configuration for basic use.
Use it for:
- Building a REST API that must comply with the JSON:API specification for client-side framework compatibility.
- Converting an existing Django REST framework API to JSON:API format without rewriting view logic.
- Implementing standardized pagination, filtering, and relationship links across a Django API.
- Creating APIs consumed by JavaScript frameworks (Ember, Vue, React) that have JSON:API client libraries.
- Handling complex nested data and relationships in a spec-compliant way with automatic serialization.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adapts Django REST framework to output responses in JSON:API specification format, handling serialization, pagination, filtering, and relationship rendering according to the JSON:API standard.
Yes. If you are building a Django REST framework API and need or want JSON:API compliance, this is the standard adapter for that job. It has low install friction, active maintenance, no known vulnerabilities, and a permissive license. It integrates cleanly with DRF's existing patterns and is well-established (since 2015). Install it if JSON:API format is a requirement or a deliberate choice for your API design.
Install
djangorestframework-jsonapi on PyPI
pip
pip install djangorestframework-jsonapiuv
uv add djangorestframework-jsonapipoetry
poetry add djangorestframework-jsonapiInstalling djangorestframework-jsonapi
Before you install
Low friction install with three straightforward runtime dependencies (django, djangorestframework, inflection). Actively maintained with recent commits and no known vulnerabilities. Supports current Python versions (3.9–3.14) and recent Django/DRF releases.
License in practice
BSD permissive license allows use in commercial and private projects with minimal restrictions—typical for web framework extensions.
Quickstart
pip install djangorestframework-jsonapi
# In settings.py, add to INSTALLED_APPS after rest_framework:
INSTALLED_APPS = [
'rest_framework',
'rest_framework_json_api',
]
# Configure REST_FRAMEWORK to use JSON:API renderers and parsers:
REST_FRAMEWORK = {
'DEFAULT_RENDERER_CLASSES': (
'rest_framework_json_api.renderers.JSONRenderer',
),
'DEFAULT_PARSER_CLASSES': (
'rest_framework_json_api.parsers.JSONParser',
),
}
Requires Django 4.2+ and Django REST framework 3.15+; Python 3.9 or later.
Verify before relying
- Whether optional integrations (django-filter, django-polymorphic) are tested against all supported versions or only the latest.
- Performance characteristics when handling large result sets or deeply nested relationships.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — inflection, djangorestframework, django |
| Maintenance | actively maintained — 301 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 368,208/month — #7,190 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: djangorestframework_jsonapi-8.1.0-py2.py3-none-any.whl
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
djangorestframeworkBuilds web APIs on top of Django with…
permissive · top 1,000 on PyPI
djangorestframework-datatablesAdds server-side Datatables support to Django…
permissive · top 15,000 on PyPI
marshmallow-jsonapiProduces JSON API 1.0-compliant output from…
permissive · top 15,000 on PyPI
djangorestframework-filtersExtends Django REST Framework with advanced…
permissive · top 15,000 on PyPI
drf-spectacular-jsonapiGenerates OpenAPI 3 schemas for Django REST…
permissive · top 15,000 on PyPI
drf-dynamic-fieldsProvides a Django REST Framework mixin that…
permissive · top 15,000 on PyPI
djangorestframework-yamlAdds YAML parsing and rendering support to…
permissive · top 15,000 on PyPI
djangorestframework-xmlAdds XML parsing and rendering support to…
permissive · top 15,000 on PyPI
django-rest-polymorphicProvides polymorphic serializers for Django…
permissive · top 5,000 on PyPI
apimatic-coreProvides core runtime utilities for REST API…
permissive · top 15,000 on PyPI