Registry / web-framework / bridgekeeper

bridgekeeper

JSON →
library0.9pypypi✓ verified 83d ago

Bridgekeeper is a Django permissions library that allows rules to be defined as QuerySet filters, enabling efficient, database-level permission checks. Current version is 0.9, compatible with Python >=3.5 and Django 2.0+. Released under MIT License; maintained irregularly with no recent updates.

pip install bridgekeeper
INSTALL
IMPORT
SIG · BRIDGEKEEPER
B
bridgekeeper
web-frameworkpythonv0.9
Install
1.8s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PermissionMap
from bridgekeeper import PermissionMap
from bridgekeeper import Permission
permission_map
from bridgekeeper import permission_map
perms
from bridgekeeper import perms

Create a permission that requires the user to be authenticated.

import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings') import django django.setup() from bridgekeeper import Permission from bridgekeeper.rules import is_authenticated # Define a simple permission view_dashboard = Permission( 'view_dashboard', is_authenticated ) # In Django settings, define PERMISSIONS dict # PERMISSIONS = {'view_dashboard': view_dashboard}
Debug
Known issues
gotchaBridgekeeper expects a dictionary named PERMISSIONS in Django settings. If not defined, no permissions are registered.
fix
Define PERMISSIONS in settings.py, e.g., PERMISSIONS = {'my_perm': my_permission}
affects: >=0.1
gotchaRules in Bridgekeeper are applied as QuerySet filters, not as Python predicates. Mixing logic that cannot be expressed as a filter will cause unexpected behavior.
fix
Ensure rules return Q objects or booleans that can be translated to database filters.
affects: >=0.1
deprecatedBridgekeeper does not actively support Django 4.x or later; test compatibility before upgrading.
fix
Consider alternative libraries like django-guardian or django-rules for newer Django versions.
affects: 0.9
Upgrade
Version history
0.9latest on PyPI · released Jun 28, 2020
Audit
Dependencies
DjangorequiredBridgekeeper is a Django permissions library; requires Django 2.0+
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
bridgekeeper — pip install bridgekeeper · libregistry