# dfunckt/django-rules

Awesome Django authorization, without the database

Repository: https://github.com/dfunckt/django-rules
Canonical: https://ross.abutalabs.com/products/django-rules
Language: Python
License: MIT
License Family: permissive
Topics: python, django, permissions, rules, predicates, authorization
Last push: 2025-10-11T06:42:08+00:00

## Health v2 (maintenance only)
Score: 44/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 46, release rhythm 8, longevity 100
- inputs: {"age_days": 4563, "days_push": 326, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1977, forks 152 (observed 2026-08-28T04:06:01.466635+00:00)

## What it is
A Python library providing object-level permissions for Django without requiring a database, built on a generic rule-based predicate framework. It integrates with Django views, templates, the Admin, and Django Rest Framework, and can also be used standalone.

## Use cases
- add object-level permissions to a django app without database-backed permission tables
- define reusable authorization predicates as composable callables
- check per-object permissions in django templates and admin
- enforce object-level permissions in django rest framework
- build a standalone rule-based decision system in python

## When to choose
- you need per-object authorization logic in Django without storing permissions in the database
- you want composable, testable predicates instead of ad-hoc permission checks
- you need permissions usable across views, templates, admin, and DRF consistently

## When to avoid
- you need database-backed, user-editable permission assignments managed at runtime
- you are not using Django and only need simple role-based access control
- you need attribute-based encryption or policy engines like OPA

## Facets
- artifact type: library
- maturity: stable
- function: authorization, middleware
- domain: web-development, backend, security
- platform: python
- tags: django, permissions, predicates, object-level-permissions, rule-based, no-database, web-server

## Member repositories
- dfunckt/django-rules (main) score 44

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:01.466635+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:04:47.086186+00:00, confidence not recorded.
  - readme: https://github.com/dfunckt/django-rules (fetched 2026-08-28T04:06:01.466635+00:00, sha 4bee99943ace)
- Data as of 2026-08-30T08:39:29.467469+00:00.
