adrf
Async support for Django REST framework
What it is and what it does
adrf is a compatibility layer that brings async/await syntax to Django REST framework, allowing you to write non-blocking request handlers in Django 4.1 and later. It provides async versions of core components—APIView, ViewSet, ModelViewSet, Serializer, and authentication/permission/throttle classes—so you can leverage Python's async ecosystem without abandoning the patterns you already use.
The package works by extending django and djangorestframework's standard classes to support async handler methods. When you use adrf's router instead of the default router, async CRUD actions on ModelViewSet are automatically mapped to routes. All handler methods in async class-based views must be declared async; function-based views decorated with adrf's @api_view must also be async. This is a migration path for teams running modern Django and wanting to handle I/O-bound operations without blocking the request thread.
Use it for:
- Build REST APIs that handle database queries asynchronously using Django's async ORM methods.
- Implement async authentication, permission, or throttle classes that need to perform I/O without blocking.
- Migrate existing projects to async handlers incrementally by converting views and viewsets one at a time.
- Write async function-based views using the @api_view decorator for lightweight, non-blocking endpoints.
- Use async serializers to validate and transform data in non-blocking contexts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds async/await support to Django REST framework views, viewsets, serializers, and authentication/permission/throttle classes, enabling non-blocking request handling in Django 4.1+.
Yes, if you are running Django 4.1+ and want to use async request handlers with django and djangorestframework. The package is actively maintained, has no known vulnerabilities, and low install friction. It is a natural fit for teams already using modern Django and seeking better I/O concurrency. Not necessary if your workload is CPU-bound or you are not yet on Django 4.1.
Install
adrf on PyPI
pip
pip install adrfuv
uv add adrfpoetry
poetry add adrfInstalling adrf
Before you install
Low friction install with a pure-Python wheel. Actively maintained as of 2026-08-11 with recent activity. Depends on django, djangorestframework, and async-property—all stable, widely-used packages.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal legal constraints, provided you retain the license notice.
Quickstart
pip install adrf
# Add to INSTALLED_APPS
INSTALLED_APPS = ['adrf', ...]
# Use async views
from adrf.views import APIView
class AsyncView(APIView):
async def get(self, request):
return {"message": "async response"}
Requires Django 4.1+ and Python 3.8+; all handler methods in async class-based views must be declared async or Django will raise an exception.
Verify before relying
- Performance characteristics compared to synchronous views under typical workloads.
- Compatibility with third-party packages that extend django or djangorestframework.
- Whether async-property is a required runtime dependency or an optional enhancement.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — django, djangorestframework, async-property |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 575,764/month — #5,936 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: adrf-0.1.14-py3-none-any.whl
Keywords: async, django, rest, framework, drf
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
djangorestframework-yamlAdds YAML parsing and rendering support to…
permissive · top 15,000 on PyPI
djangorestframeworkBuilds web APIs on top of Django with…
permissive · top 1,000 on PyPI
djangorestframework-role-filtersAdds role-based access control to Django REST…
permissive · top 5,000 on PyPI
drf-rw-serializersExtends Django REST Framework with separate…
permissive · top 15,000 on PyPI
drf-orjson-rendererProvides a high-performance JSON renderer and…
permissive · top 15,000 on PyPI
djangorestframework-bulkAdds bulk create, update, and delete operations…
permissive · top 15,000 on PyPI
djangorestframework-xmlAdds XML parsing and rendering support to…
permissive · top 15,000 on PyPI
rest_conditionProvides logical operators (And, Or, Not) to…
permissive · top 15,000 on PyPI
drf-dynamic-fieldsProvides a Django REST Framework mixin that…
permissive · top 15,000 on PyPI
djangorestframework-csvAdds CSV rendering and parsing capabilities to…
permissive · top 5,000 on PyPI