drf-extensions
Extensions for Django REST Framework
Decision gist · record as of 2026-08-14
Yes. drf-extensions is a stable, actively maintained library that solves real problems in Django REST Framework projects—detail serializers, caching, bulk operations, and nested routes are common needs. Low install friction, no security vulnerabilities, permissive license, and broad version support make it a safe addition to any DRF-based API.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with a pure Python wheel.
- Actively maintained as of 2026-08-06, tested against modern Python (3.9, 3.10, 3.11, 3.12, 3.13, 3.14) and Django/DRF versions (Django 3.2 to 6.0, DRF 3.12, 3.13, 3.14, 3.15, 3.16).
- No known security vulnerabilities.
License · maintenance · safety
BSD (permissive) — BSD license is permissive; you can use, modify, and distribute this package with minimal legal constraints in most commercial and open-source contexts.
last release 2025-04-10 (491 days) · last repo commit 2026-08-06 · 1,550 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,684,753 downloads/mo, #2,939 on PyPI
Alternatives
Verify before relying
pip install drf-extensions
from drf_extensions.mixins import DetailSerializerMixin
from djangorestframework import viewsets
class MyViewSet(DetailSerializerMixin, viewsets.ModelViewSet):
serializer_class = MySerializer
serializer_detail_class = MyDetailSerializer- Whether caching and conditional request features work with all cache backends or only specific ones.
- Performance impact of nested routes and bulk operations on large datasets.
- Compatibility with third-party DRF packages beyond those explicitly tested.
- Exact module paths and import patterns for all extension features.
What it is and what it does
drf-extensions is a collection of add-ons for Django REST Framework that fills gaps in the core framework's API design and performance tooling. It provides mixins to use different serializers for list vs. detail views, decorators for HTTP caching and conditional requests, utilities for constructing cache keys, support for nested routes, and helpers for bulk create/update/delete operations. The package is built on top of djangorestframework, packaging, and Django itself, so it integrates directly into your existing DRF viewsets and serializers.
The package is mature and actively maintained, with a long release history since 2013 and recent updates. It's tested against a wide range of Python and Django versions, making it a stable choice for projects that need these common REST API patterns without rolling custom code.
Use it for
- Use different serializers for list endpoints versus detail endpoints with a mixin.
- Cache API responses conditionally based on HTTP headers and request state to reduce database load.
- Implement bulk create, update, or delete operations on collections in a single request.
- Define nested resource routes without manual URL configuration.
- Customize cache key construction to handle complex cache invalidation scenarios.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
drf-extensions is a stable, actively maintained library that solves real problems in Django REST Framework projects—detail serializers, caching, bulk operations, and nested routes are common needs. Low install friction, no security vulnerabilities, permissive license, and broad version support make it a safe addition to any DRF-based API.
Install
drf-extensions on PyPI
Before you install
Low friction install with a pure Python wheel. Actively maintained as of 2026-08-06, tested against modern Python (3.9, 3.10, 3.11, 3.12, 3.13, 3.14) and Django/DRF versions (Django 3.2 to 6.0, DRF 3.12, 3.13, 3.14, 3.15, 3.16). No known security vulnerabilities.
License in practice
BSD license is permissive; you can use, modify, and distribute this package with minimal legal constraints in most commercial and open-source contexts.
Quickstart
pip install drf-extensions
from drf_extensions.mixins import DetailSerializerMixin
from djangorestframework import viewsets
class MyViewSet(DetailSerializerMixin, viewsets.ModelViewSet):
serializer_class = MySerializer
serializer_detail_class = MyDetailSerializer
Verify before relying
- Whether caching and conditional request features work with all cache backends or only specific ones.
- Performance impact of nested routes and bulk operations on large datasets.
- Compatibility with third-party DRF packages beyond those explicitly tested.
- Exact module paths and import patterns for all extension features.
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesdjangorestframeworkpackagingDjango |
| Maintenance | Actively maintained 491 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,684,753 / month, #2,939 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.2Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP |
Evidence: drf_extensions-0.8.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django rest framework extensions”
- drf-extensionsProvides mixins, decorators, and utilities that extend Django REST…
- edx-drf-extensionsProvides JWT authentication, CSRF token endpoints, and cross-cutting…
- drf-extra-fieldsProvides specialized serializer fields for Django REST Framework,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also drf-rw-serializers · drf-dynamic-fields · django-dynamic-preferences · drf-spectacular-jsonapi · djangorestframework-recursive · djangorestframework-role-filters · djangorestframework-bulk · drf-writable-nested · drf-nested-routers · djangorestframework