--- id: drf-rw-serializers version: "1.4.0" license: MIT license_treatment: permissive maintenance: aging --- # drf-rw-serializers — Generic views, viewsets and mixins that extend the Django REST Framework ones adding separated serializers for read and write operations License: permissive · Maintenance: aging · Downloads: 74.9K/mo ## What it is and what it does drf-rw-serializers is a Django REST Framework extension that allows you to define separate serializers for read (response) and write (request) operations in your API views and viewsets. Instead of forcing a single serializer to handle both input validation and output representation, you can optimize each independently—for example, using a lightweight serializer for writes and a richer one for reads with nested relationships or computed fields. The package provides drop-in replacements for djangorestframework's generic views, viewsets, and mixins that automatically route requests to your read_serializer_class or write_serializer_class as appropriate. It has a single runtime dependency on djangorestframework and supports Python 3.8, 3.9, 3.10, 3.11, and 3.12. The codebase is stable but aging, with the last release 799 days ago; however, the repository remains maintained with recent commits. Use it for: - API endpoints where write requests need minimal fields but responses include computed or nested data. - Separating input validation logic from output representation in complex djangorestframework projects. - Reducing payload size on write operations while enriching read responses with related objects. - Implementing different permission or field-level logic for incoming vs. outgoing serialization. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extends Django REST Framework with separate read and write serializers for generic views, viewsets, and mixins, allowing different serialization logic for request and response operations. Yes, if you are building a djangorestframework API and need different serialization schemas for requests and responses. The package is straightforward to integrate, has low install friction, and solves a real architectural problem. However, note that maintenance is aging—the last release was 799 days ago—so verify compatibility with your current djangorestframework and Django versions before adopting. ## Install pip install drf-rw-serializers uv add drf-rw-serializers poetry add drf-rw-serializers ## Installing drf-rw-serializers Before you install: Low install friction with a single runtime dependency on djangorestframework. Maintenance status is aging—last release was 799 days ago, though the repository remains active with a recent commit on 2025-03-06 and no archived status. License in practice: MIT license (permissive) permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text. Quickstart: pip install drf-rw-serializers from drf_rw_serializers.generics import GenericViewSet class MyViewSet(GenericViewSet): read_serializer_class = MyReadSerializer write_serializer_class = MyWriteSerializer Requires djangorestframework to be installed and configured; intended for use within a Django project with djangorestframework already set up. Verify before relying: - Whether the package supports the latest djangorestframework versions and any recent breaking changes. - Performance characteristics when handling large datasets with separate read/write serializers. - Specific Django version compatibility beyond what the classifiers indicate. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 74.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework read write serializers, drf separate serializers requests responses, django api different input output schemas, drf viewsets read write operations, django rest framework dual serializers, django-rest-framework, serialization, api-design [View on SkillFed](https://skillfed.io/packages/drf-rw-serializers) · [View on PyPI](https://pypi.org/project/drf-rw-serializers/)