{"categories":[{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/3"}],"enrichment":{"capability":"Extends Django REST Framework serializers to handle creation and updates of nested model relationships (OneToOne, ForeignKey, ManyToMany, GenericRelation) in a single request.","skillfed_tags":["django-rest-framework","serialization","nested-data"],"use_cases":["Accept a user profile with nested sites, access keys, and avatars in one POST request instead of multiple API calls.","Update a parent object and its related children (e.g., a voucher and its line items) via a single PATCH or PUT.","Build admin-style APIs where clients submit entire object trees with related data and expect atomic creation or update.","Simplify client code by eliminating the need to orchestrate multiple serializer calls for interdependent model hierarchies.","Handle reverse relationships (e.g., a user's profile, or a profile's avatars) without flattening or restructuring the data."],"what_it_does":"DRF Writable Nested is a Django REST Framework extension that lets you serialize and deserialize nested model relationships\u2014OneToOne, ForeignKey, ManyToMany, and GenericRelation\u2014in a single API request. Instead of making separate calls to create or update related objects, you pass a nested data structure to the serializer, and it handles all the database operations atomically.\n\nThe package provides WritableNestedModelSerializer as the main class, plus NestedCreateMixin and NestedUpdateMixin for more granular control. It also includes UniqueFieldsMixin to handle validation of unique fields on nested updates. The serializer automatically creates or updates all related instances and returns a complete object graph, making it useful for APIs that need to accept complex, hierarchical input in a single request.","worth_installing":"Yes, if you are building Django REST Framework APIs that accept nested model data. The package is stable (BSD licensed, no known vulnerabilities, 1139 GitHub stars), has low install friction, and solves a common pain point in DRF. The aging maintenance status (522 days since last release) is a minor concern for long-term support, but the repository remains active and the package supports current Django and Python versions. Install it when you need to handle nested creates/updates; skip it if your API only works with flat, single-model payloads."},"id":"drf-writable-nested","links":{"html":"https://skillfed.io/packages/drf-writable-nested","md":"https://skillfed.io/packages/drf-writable-nested.md","pypi":"https://pypi.org/project/drf-writable-nested/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-03-10","license_spdx":null,"license_treatment":"permissive","name":"drf-writable-nested","python_support":"supports_current","summary":"Writable nested helpers for django-rest-framework's serializers"},"popularity":{"monthly_downloads":735738,"position":5195,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.2"}
