{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/5"}],"enrichment":{"capability":"Declares access control rules for Django REST Framework views using an AWS IAM-like policy syntax, with optional field-level permission enforcement through serializer mixins.","skillfed_tags":["authorization","access-control","django-rest-framework"],"use_cases":["Define role-based access control for a REST API where editors can publish articles but regular users can only list and retrieve them.","Enforce field-level permissions so junior developers can update certain fields but not others (e.g., status fields reserved for admins).","Centralize authorization logic in one place instead of spreading it across multiple views, making audits and policy changes easier.","Use reusable custom conditions to share complex permission checks across multiple policies without code duplication.","Match HTTP methods (POST, PUT, PATCH) directly in action rules to handle different request types with a single statement."],"what_it_does":"drf-access-policy brings declarative, centralized access control to Django REST Framework by letting you define authorization rules in a single policy class per view, modeled after AWS IAM syntax. Instead of scattering permission logic across views and serializers, you write explicit statements that match actions (list, retrieve, publish) to principals (users, groups, anonymous) and effects (allow/deny), making access rules readable to both developers and non-technical stakeholders.\n\nThe package also provides FieldAccessMixin to dynamically enforce field-level read-only restrictions based on the same policy, so you can control not just who can call an endpoint but which fields they can modify. The core AccessPolicy class is intentionally small (~150 lines) with no magic, and the library includes complete test coverage. It integrates directly into Django REST Framework's ViewSet permission system.","worth_installing":"Yes, with conditions. The package solves a real problem\u2014centralizing and clarifying access control in Django REST Framework\u2014and the MIT license imposes no restrictions. However, dormancy is a concern: the last release was March 2023 and the project receives no active maintenance. Install it if your Django and DRF versions stay within the supported range (Django 2.0\u20133.2, Python 3.6\u20133.11) and you can maintain it yourself if needed. For newer Django/Python versions, verify compatibility before committing."},"id":"drf-access-policy","links":{"html":"https://skillfed.io/packages/drf-access-policy","md":"https://skillfed.io/packages/drf-access-policy.md","pypi":"https://pypi.org/project/drf-access-policy/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-03-02","license_spdx":null,"license_treatment":"permissive","name":"drf-access-policy","python_support":"unspecified","summary":"Declarative access policies/permissions modeled after AWS' IAM policies."},"popularity":{"monthly_downloads":106243,"position":12660,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.5.0"}
