djangorestframework-recursive
Recursive Serialization for Django REST framework
What it is and what it does
djangorestframework-recursive provides a RecursiveField that handles serialization and deserialization of recursive data structures in Django REST Framework. Instead of writing custom recursive logic or nested serializers, you can use RecursiveField as a child of a ListField to represent tree nodes, linked lists, or acyclic graphs. The package claims to support validation, deserialization, ModelSerializers, and multi-step recursive structures.
The package is in Pre-Alpha status and has been dormant since its latest release. It was tested against Python 2.7, 3.4, and 3.6; Django 1.8–2.0; and DRF 3.3–3.7. No runtime dependencies are required beyond Django and DRF themselves, making installation straightforward. However, the lack of recent maintenance and pre-release status mean compatibility with modern Python, Django, and DRF versions is unverified.
Use it for:
- Serialize a tree of categories or organizational hierarchies in a REST API without manually nesting serializers
- Handle linked-list structures like comment threads with replies in JSON responses
- Deserialize and validate recursive JSON payloads representing graphs or nested structures
- Build a ModelSerializer for Django models with self-referential foreign keys
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds a RecursiveField to Django REST Framework that serializes and deserializes tree structures, linked lists, and directed acyclic graphs without writing custom recursive logic.
No—unless you are maintaining legacy code on Django 1.8–2.0 and DRF 3.3–3.7. The package is Pre-Alpha, dormant since 2017, and untested against modern versions. For new projects, use built-in DRF nested serializers or a maintained alternative. The lack of recent updates and pre-release status create risk of incompatibility and unresolved bugs.
Install
djangorestframework-recursive on PyPI
pip
pip install djangorestframework-recursiveuv
uv add djangorestframework-recursivepoetry
poetry add djangorestframework-recursiveInstalling djangorestframework-recursive
Before you install
Low install friction with no runtime dependencies. Dormant since July 2017; last commit August 2024 suggests minimal maintenance. Pre-Alpha status and lack of recent activity mean expect limited support for modern Django or DRF versions.
License in practice
BSD license is permissive; you can use, modify, and distribute this package freely in most contexts without restriction.
Quickstart
pip install djangorestframework-recursive
from djangorestframework_recursive.fields import RecursiveField
class TreeSerializer(serializers.Serializer):
name = serializers.CharField()
children = serializers.ListField(child=RecursiveField())
Requires Django and Django REST Framework to be installed separately; tested against Django 1.8–2.0 and DRF 3.3–3.7, but compatibility with modern versions is unverified.
Verify before relying
- Whether RecursiveField works with current versions of Django (3.2+) and Django REST Framework (3.12+)
- Whether validation and deserialization work as documented in the description excerpt
- Whether multi-step recursive structures are production-ready or experimental
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 3,328 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 267,185/month — #8,295 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: djangorestframework_recursive-0.1.2-py2.py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
drf-writable-nestedExtends Django REST Framework serializers to…
permissive · top 15,000 on PyPI
drf-extra-fieldsProvides specialized serializer fields for…
permissive · top 15,000 on PyPI
drf-dynamic-fieldsProvides a Django REST Framework mixin that…
permissive · top 15,000 on PyPI
djangorestframework-gisAdds geographic and GeoJSON support to Django…
permissive · top 15,000 on PyPI
drf-extensionsProvides mixins, decorators, and utilities that…
permissive · top 5,000 on PyPI
drf-rw-serializersExtends Django REST Framework with separate…
permissive · top 15,000 on PyPI
djangorestframework-xmlAdds XML parsing and rendering support to…
permissive · top 15,000 on PyPI
djangorestframework-yamlAdds YAML parsing and rendering support to…
permissive · top 15,000 on PyPI
drf-jsonschema-serializerConverts Django REST Framework serializers to…
permissive · top 15,000 on PyPI
djangorestframeworkBuilds web APIs on top of Django with…
permissive · top 1,000 on PyPI