{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Provides Django REST Framework serializers that handle Django's generic foreign keys, allowing you to serialize and deserialize polymorphic relationships across arbitrary model types.","skillfed_tags":["django-rest-framework","serialization","polymorphic-relations"],"use_cases":["Tag or annotation systems where tags can be attached to multiple unrelated model types.","Activity feeds or audit logs that record actions on different model types in a single list.","API endpoints returning mixed collections of different model types.","Polymorphic relationships where a single foreign key field must point to one of several model types."],"what_it_does":"This package extends Django REST Framework with serializers for handling generic foreign keys\u2014the polymorphic relationships Django allows via ContentType and object_id pairs. It provides two main components: one maps model types to their respective serializers for serializing a single generic relationship to any of several possible models, and another handles serializing mixed lists of different model instances, delegating to the appropriate serializer based on each object's type.\n\nThe library is designed for scenarios where a single model field points to multiple unrelated model types. It handles both read and write operations, though write support relies on the nested serializers' ability to deserialize. The package is stable and maintained for bug fixes and compatibility updates, though no major feature development is planned.","worth_installing":"Yes, if you need to serialize Django generic foreign keys in REST APIs. The package is well-suited for its narrow purpose, has no known vulnerabilities, low install friction, and permissive licensing. The dormant maintenance status is not a concern for a stable, focused library\u2014it indicates the maintainer will fix bugs and keep compatibility current rather than add new features. Use it when your API design genuinely requires polymorphic relations."},"id":"rest-framework-generic-relations","links":{"html":"https://skillfed.io/packages/rest-framework-generic-relations","md":"https://skillfed.io/packages/rest-framework-generic-relations.md","pypi":"https://pypi.org/project/rest-framework-generic-relations/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-03-27","license_spdx":null,"license_treatment":"permissive","name":"rest-framework-generic-relations","python_support":"supports_current","summary":"Generic Relations for Django Rest Framework"},"popularity":{"monthly_downloads":123619,"position":11903,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.2.0"}
