{"repo":"hirokiky/django-keeper","free":true,"listed":false,"github":"https://github.com/hirokiky/django-keeper","clone":"git clone https://github.com/hirokiky/django-keeper.git","description":"Authorization library for Django, with ACL, not depends on models.","language":"Python","stars":51,"topics":["django","permissions","authorization"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"django-keeper Authorization library for Django, not depends on models. Won't depend on models Won't depend on datastores Won't depend on Django's permission system Won't depend on Django's User model Supported versions: Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12 Python 3.13 Django 2.2 Django 3.0 Django 3.1 Django 3.2 Django 4.1 Django 4.2 Django 5.0 Django 5.1 Django 5.2 Install And add to INSTALLED APPS At A Glance Declarative permission mapping for models. Instances of model allow: Every requests to view Autheticated requests to add comments it's author to edit Then, apply @keeper for views. Global Permission Not just for model permissions django-keeper can handle global permissions. First, write class having acl method in models.py. It's not necessary to put it in models.py , but easy to understand. And specify it in settings. Then you can use global permission in views. Simply just apply @keeper and permission names. Operators Operators is just Callable[[HttpRequest], bool] . By default django-keeper has these operators: keeper.operators.Everyone keeper.operators.Authenticated keeper.operators.IsUser keeper.operators.Staff Also you can create your own operators easily. Use it in ACL Combining operators You can use bitwise operators to combine multiple \"Operators\". There operators can be used a & b a b a ^ b a On Fail Actions You can change actions when requests can't pass ACLs. This view will behave just like @login required decorator of Django when request","default_branch":null,"files":null,"tree":[],"storefront":"/r/hirokiky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hirokiky/django-keeper/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."}