{"repo":"khaledsukkar2/drf-shapeless-serializers","free":true,"listed":false,"github":"https://github.com/khaledsukkar2/drf-shapeless-serializers","clone":"git clone https://github.com/khaledsukkar2/drf-shapeless-serializers.git","description":"Dynamically assemble and shape your Django Rest Framework serializers at runtime.","language":"Python","stars":58,"topics":["django","django-rest-framework","drf","serializers","dynamic-serializers","python"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"drf-shapeless-serializers Motivation Traditional Django REST Framework serializers often lead to what’s known as “serializer hell” - a situation where developers: Create numerous serializer variations for slightly different API endpoints Duplicate code for simple field variations Struggle with rigid and complex nested relationships Maintain sprawling serializer classes that become hard to manage drf-shapeless-serializers was created to solve these pain points by introducing dynamic runtime configuration capabilities, allowing you to eliminate up to 80% of your serializer code while gaining unprecedented flexibility. Documentation https://drf-shapeless-serializers.readthedocs.io/en/latest/ Overview drf-shapeless-serializers provides powerful mixins that extend Django REST Framework's serializers with dynamic configuration capabilities. By inheriting from our base classes, you can select fields at runtime, rename output keys dynamically, modify field attributes per-request, and add configured nested relationships on-the-fly. Installation Add to your Django settings : Usage Basic Setup 1. Define your shapeless serializer : 2. Configure dynamically in views : Instead of passing dictionaries, you now pass instantiated serializers into the nested parameter, allowing for a more Pythonic and type-safe configuration. Feature Highlights 1. Class-Based View (CBV) Support The ShapelessViewMixin allows you to define dynamic configurations directly on your ViewSets. This keeps your view lo","default_branch":null,"files":null,"tree":[],"storefront":"/r/khaledsukkar2","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/khaledsukkar2/drf-shapeless-serializers/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}