OSS TanbouSign in with GitHub

build Django Web APIs with serializers, authentication, permissions, and viewsets

OSS scale score 321.6OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
30,201
Primary language
Python
License
BSD-3-Clause
Repository last updated
Oct 5, 2026
On this page

Overview

Django REST framework is a Web API toolkit for Django. It combines serializers, authentication and permissions, generic views, ViewSets, routers, and a browsable API for APIs backed by Django ORM or non-ORM data sources.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Serialize Django models or arbitrary data into API representations

Serializer and ModelSerializer define input validation and response serialization for model-backed and non-ORM data sources.

Sources: [2]

Compose endpoints with ViewSets, routers, authentication, and permissions

ViewSets and routers can generate URL routing, while applications can fall back to generic or function-based views when needed. Django authentication and permission policies integrate with the browsable API for development workflows.

Sources: [2]

Best fit

Fits Django applications adding a structured REST API layer

It is well suited to applications already using Django models and authentication that want shared serializers and permission rules around JSON APIs.

Sources: [2]

Before adoption

DRF 3.18.1 requires Python 3.10+ and supports Django 5.2, 6.0, and 6.1

Version 3.18.1 targets Python 3.10+ and Django 5.2/6.0/6.1. It fixes duplicate validation errors, OpenAPI integer format detection, unique constraints, and non-finite FloatField values, so serializer error formats and schema generation deserve upgrade regression tests.

Sources: [3][4]

Official sources

  1. [1]encode/django-rest-framework — GitHub repository(2026-10-06)
  2. [2]Django REST framework 3.18.1 — README(2026-10-06)
  3. [3]Django REST framework 3.18.1 — pyproject.toml(2026-10-06)
  4. [4]Django REST framework 3.18.1 release(2026-10-06)
  5. [5]Django REST framework BSD-3-Clause license(2026-10-06)
Supplemental curator note

DRF is powerful when Django models and authentication already exist, but choose ViewSets and routers versus more explicit generic views according to API complexity to keep behavior maintainable.

Try it in 3 steps

  1. 1

    Install DRF 3.18.1 and a supported Django version

    Pin DRF and install Django within the officially supported 5.2 through 6.1 range.

    python -m pip install "djangorestframework==3.18.1" "Django>=5.2,<6.2"
  2. 2

    Create a minimal Django project and API endpoint

    Enable rest_framework and create a read-only GET endpoint that does not require a database model.

    django-admin startproject example . && python - <<'PY' from pathlib import Path p = Path('example/settings.py') s = p.read_text() s = s.replace("INSTALLED_APPS = [", "INSTALLED_APPS = [\n 'rest_framework',") p.write_text(s) Path('example/urls.py').write_text('''from django.urls import path from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(["GET"]) def hello(request): return Response({"hello": "drf"}) urlpatterns = [path("", hello)] ''') PY
  3. 3

    Run the development server and check the API

    Run the Django development server on localhost and confirm the JSON response. Use a production deployment setup outside local verification.

    python manage.py runserver 127.0.0.1:8000 # In another terminal: curl -fsS http://127.0.0.1:8000/
Check the official README

Growth

Growth trends · Last 30 days

30,201 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • api
  • django
  • python
  • rest
Stars
30,201
Forks
7,086
Watchers
604
Open issues
49
Contributors
386
Owner type
Organization
Primary language
Python
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?