{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Provides a Django REST Framework mixin that lets you dynamically select which serializer fields to include or exclude per request using query parameters.","skillfed_tags":["django-rest-framework","api-optimization","serialization"],"use_cases":["Reduce API response payload size by letting mobile clients request only essential fields over bandwidth-constrained connections.","Build flexible APIs where frontend teams can request exactly the fields they need without creating multiple endpoints.","Optimize database query results by excluding heavy computed or related fields that aren't needed for a particular request.","Support legacy API clients that expect different field subsets without duplicating serializer logic across endpoints."],"what_it_does":"drf-dynamic-fields is a mixin for Django REST Framework serializers that lets API clients control which fields appear in responses via query parameters. Instead of always returning all fields, clients can pass `?fields=id,name` to get only those fields, or `?omit=email` to exclude specific ones. The mixin intercepts the serialization process and dynamically removes unwanted fields before rendering the response.\n\nThe package is deliberately minimal\u2014it handles flat field filtering only and does not plan to add support for nested fields. It integrates by inheriting from DynamicFieldsMixin alongside your serializer class, and requires the request object to be available in the serializer's context. The implementation is stable and has been in production use since first release in 2016, though development has slowed (last release in April 2022).","worth_installing":"Yes, if you are using Django REST Framework and need simple per-request field filtering. The package has no dependencies, low install friction, and a permissive MIT license. However, the aging maintenance status (last release April 2022) means you should verify compatibility with your Django 2.2 LTS, 3.2 LTS, or 4.0 and DRF 3.8 or 3.9 versions before adopting it."},"id":"drf-dynamic-fields","links":{"html":"https://skillfed.io/packages/drf-dynamic-fields","md":"https://skillfed.io/packages/drf-dynamic-fields.md","pypi":"https://pypi.org/project/drf-dynamic-fields/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2022-04-05","license_spdx":null,"license_treatment":"permissive","name":"drf-dynamic-fields","python_support":"unspecified","summary":"Dynamically return subset of Django REST Framework serializer fields"},"popularity":{"monthly_downloads":147910,"position":11049,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.0"}
