drf-extra-fields
Additional fields for Django Rest Framework.
Decision gist · record as of 2026-08-14
Yes, with conditions. The package fills genuine gaps in DRF's field offerings and has low install friction. However, maintenance is aging—the last release was August 2023—so verify compatibility with your specific Django and DRF versions before adopting. No known security vulnerabilities. Suitable for projects needing base64 file handling, geographic fields, or PostgreSQL range support and tolerating infrequent updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and djangorestframework to be installed; filetype is a runtime dependency for image type detection.
- Low install friction with a pure-Python wheel.
- Maintenance is aging—last release was in August 2023, though the repository remains active with recent commits and no archived status.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions. No notable licensing barriers for most projects.
last release 2023-08-08 (1102 days) · last repo commit 2025-08-26 · 688 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 569,590 downloads/mo, #5,960 on PyPI
Alternatives
Verify before relying
pip install drf-extra-fields
from drf_extra_fields.fields import Base64ImageField
from drf_extra_fields.geo_fields import PointField
class ImageSerializer:
image = Base64ImageField()
point = PointField()- Current compatibility with Django versions beyond 4.0 and whether recent DRF releases work without issues.
- Whether the aging maintenance status affects stability or introduces compatibility gaps with recent framework releases.
- Performance characteristics and any known limitations when handling large base64-encoded files.
What it is and what it does
drf-extra-fields extends Django REST Framework with specialized serializer fields that handle use cases not covered by the framework's built-in offerings. It provides base64 image and file fields for encoding/decoding binary data as strings, geographic point fields for latitude/longitude pairs, PostgreSQL-specific range fields (integer, float, decimal, date, datetime), and enhanced relational fields like PresentablePrimaryKeyRelatedField that represent related objects with custom serializers.
The package is designed as a drop-in extension: you import field classes into your serializers and use them like standard DRF fields. It depends on Django, djangorestframework, and filetype for image type detection. Recent versions have modernized the codebase for Python 3.7+, removed unintended dependencies, and added support for psycopg 3 alongside psycopg2.
Use it for
- Accept base64-encoded image uploads in REST API endpoints and store them as files without multipart form data.
- Serialize geographic coordinates as latitude/longitude dictionaries for location-based APIs.
- Work with PostgreSQL range fields in Django models while maintaining clean serialization in REST APIs.
- Display related objects with full serialized details using PresentablePrimaryKeyRelatedField.
- Build APIs that accept or return files as base64 strings for client-side convenience.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package fills genuine gaps in DRF's field offerings and has low install friction. However, maintenance is aging—the last release was August 2023—so verify compatibility with your specific Django and DRF versions before adopting. No known security vulnerabilities. Suitable for projects needing base64 file handling, geographic fields, or PostgreSQL range support and tolerating infrequent updates.
Install
drf-extra-fields on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance is aging—last release was in August 2023, though the repository remains active with recent commits and no archived status. Depends on Django, djangorestframework, and filetype; psycopg 3 is now supported automatically if available.
Requires Django and djangorestframework to be installed; filetype is a runtime dependency for image type detection.
License in practice
Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions. No notable licensing barriers for most projects.
Quickstart
pip install drf-extra-fields
from drf_extra_fields.fields import Base64ImageField
from drf_extra_fields.geo_fields import PointField
class ImageSerializer:
image = Base64ImageField()
point = PointField()
Verify before relying
- Current compatibility with Django versions beyond 4.0 and whether recent DRF releases work without issues.
- Whether the aging maintenance status affects stability or introduces compatibility gaps with recent framework releases.
- Performance characteristics and any known limitations when handling large base64-encoded files.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesDjangodjangorestframeworkfiletype |
| Maintenance | Aging 1,102 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 569,590 / month, #5,960 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: 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.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic Content |
Evidence: drf_extra_fields-3.7.0-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 custom fields”
- drf-extra-fieldsProvides specialized serializer fields for Django REST Framework,…
- djangorestframework-gisAdds geographic and GeoJSON support to Django REST Framework,…
- djangorestframework-dataclassesAutomatically generates Django REST Framework serializers from Python…
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 django-cleanup · drf-dynamic-fields · djangorestframework-recursive · django-versatileimagefield · django-rest-polymorphic · rest-framework-generic-relations · djangorestframework-dataclasses · drf-writable-nested · djangorestframework-xml · djangorestframework-yaml