skillfed

djangorestframework-jsonapi

A Django REST framework API adapter for the JSON:API spec.

djangorestframework-jsonapi v8.1.0 368.2K downloads/30d#7,190 on PyPI1,252
Permissive license BSD Active released

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-jsonapi

uv

uv add djangorestframework-jsonapi

poetry

poetry add djangorestframework-jsonapi

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Tags

json:api django rest frameworkjsonapi serializer djangojson:api format djangorest api json:api compliancedjango jsonapi adapterjson:api pagination filteringdjango rest framework json:api
json-apirest-apidjango-integration

More Python Modules packages

idna

Converts domain names between Unicode and…

permissive · top 100 on PyPI

setuptools

Setuptools is a Python build backend and…

permissive · top 100 on PyPI

PyYAML

PyYAML parses and emits YAML 1.1 data format,…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

annotated-types

Provides reusable metadata objects for use with…

permissive · top 100 on PyPI

typing-inspection

Provides runtime tools to inspect and…

permissive · top 100 on PyPI

djangorestframework

Builds web APIs on top of Django with…

permissive · top 1,000 on PyPI

djangorestframework-datatables

Adds server-side Datatables support to Django…

permissive · top 15,000 on PyPI

marshmallow-jsonapi

Produces JSON API 1.0-compliant output from…

permissive · top 15,000 on PyPI

djangorestframework-filters

Extends Django REST Framework with advanced…

permissive · top 15,000 on PyPI

drf-spectacular-jsonapi

Generates OpenAPI 3 schemas for Django REST…

permissive · top 15,000 on PyPI

drf-dynamic-fields

Provides a Django REST Framework mixin that…

permissive · top 15,000 on PyPI

djangorestframework-yaml

Adds YAML parsing and rendering support to…

permissive · top 15,000 on PyPI

djangorestframework-xml

Adds XML parsing and rendering support to…

permissive · top 15,000 on PyPI

django-rest-polymorphic

Provides polymorphic serializers for Django…

permissive · top 5,000 on PyPI

apimatic-core

Provides core runtime utilities for REST API…

permissive · top 15,000 on PyPI