--- id: django-prbac version: "1.1.2" license: unclear license_treatment: unclear maintenance: active --- # django-prbac — Parameterized Role-Based Access Control for Django License: unclear · Maintenance: active · Downloads: 77.7K/mo ## What it is and what it does Django-prbac brings parameterized role-based access control to Django applications. Unlike Django's built-in permission system, which is tied to content types, PRBAC lets you define roles and privileges as abstract concepts and add parameters to them—so you can grant something like 'Reporting(organization="Dimagi", area="Finance")' to a specific role. This is more expressive than traditional RBAC because the parameters can be finite sets or infinite (strings, integers, etc.), making it exponentially or infinitely more powerful depending on how you use it. The package depends on Django, jsonfield, and simplejson to store and manage these parameterized roles and privileges. It is actively maintained, supports modern Python versions (3.9–3.13) and recent Django releases (4.2 through 5.2), and has no known security vulnerabilities. The library is marked as alpha-stage but has been in development since 2013, so it is reasonably stable for production use. Use it for: - Multi-tenant SaaS applications where different organizations need different access levels to the same features. - Complex reporting systems where analysts need access to specific data subsets parameterized by region, department, or time period. - Enterprise applications with hierarchical role structures where roles inherit privileges conditionally based on parameters. - Systems requiring fine-grained object-level access control tied to role membership and parameter matching. - Applications that need to audit and manage who has access to what without hardcoding permissions in code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements parameterized role-based access control (PRBAC) for Django applications, allowing you to define roles and privileges with parameters to control who can do what across your system. Yes, if you need parameterized role-based access control beyond what Django's built-in auth provides. The package is actively maintained, has low install friction, supports current Python and Django versions, and carries no known vulnerabilities. It is marked alpha but has been stable since 2013. The main caveat is that the license treatment is unclear in the metadata, so verify the actual license (described as MIT in the documentation) before use. ## Install pip install django-prbac uv add django-prbac poetry add django-prbac ## Installing django-prbac Before you install: Low friction install with three straightforward runtime dependencies (django, jsonfield, simplejson). The package is actively maintained with recent commits and marked as alpha-stage, so it is suitable for production use but may see API changes. Quickstart: pip install django-prbac from django_prbac.models import Role, Privilege # Define a role with parameters role = Role.objects.create(name='Analyst') privilege = Privilege.objects.create(name='Reporting', role=role) Requires Django 4.2 or later and Python 3.9 or later; must be used within a Django project with a configured database. Verify before relying: - Specific examples of how parameters are passed and evaluated in practice beyond the documentation excerpt. - Whether the package provides decorators or middleware for enforcing access control in views. - Performance characteristics when dealing with deeply nested roles or large numbers of parameterized privileges. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 77.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django role-based access control, parameterized rbac django, django permission system, django access control, role-based authorization django, django privilege management, django prbac, access-control, django-extension, rbac [View on SkillFed](https://skillfed.io/packages/django-prbac) · [View on PyPI](https://pypi.org/project/django-prbac/)