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.
Official sources
- [1]encode/django-rest-framework — GitHub repository(2026-10-06)
- [2]Django REST framework 3.18.1 — README(2026-10-06)
- [3]Django REST framework 3.18.1 — pyproject.toml(2026-10-06)
- [4]Django REST framework 3.18.1 release(2026-10-06)
- [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
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
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
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/
Growth
Growth trends · Last 30 days
30,201 Stars
Trend data is still being collected.
Built with
Categories and tags
Categories
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
- License
- BSD-3-Clause
- Repository last updated
- Oct 5, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- aiohttp16,569 Stars
3 shared tag(s) · 2 shared category(s) · Same language
build asyncio HTTP clients, servers, and WebSockets with one Python framework
Python - Starlette12,655 Stars
3 shared tag(s) · 2 shared category(s) · Same language
build asynchronous Python web services from lightweight ASGI components
Python - Django91,323 Stars
3 shared tag(s) · 1 shared category(s) · Same language
an integrated Python web framework with ORM, admin, URL routing, views, and templates
Python - Flask74,897 Stars
3 shared tag(s) · 1 shared category(s) · Same language
build Python WSGI applications with routing, request handling, and Jinja templates
Python - Fiber40,204 Stars
2 shared tag(s) · 2 shared category(s)
combine Express-inspired routing, binding, and middleware on top of fasthttp
Go - ASP.NET Core38,465 Stars
2 shared tag(s) · 2 shared category(s)
build web apps, HTTP APIs, and mobile backends on a modular cross-platform .NET web framework
C#
Report incorrect information
Tell us if any listing information is incorrect or outdated.