Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

EB-Power/python-dycasbin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamoDB adopter for casbin

Installation

From Source

uv build

From pypi

# with uv
uv add python-dycasbin
# with pip
pip install python-dycasbin

Usage

import casbin
from python_dycasbin import adapter

adapter = adapter.Adapter(table_name='casbin_rule', endpoint_url='http://localhost:8000')
e = casbin.Enforcer("model.conf", adapter, True)

sub = "eve4"  # the user that wants to access a resource.
obj = "data3"  # the resource that is going to be accessed.
act = "read"  # the operation that the user performs on the resource.

if e.enforce(sub, obj, act):
    print("Allow")
else:
    print("Deny")

About

dynamodb adopter for casbin in python

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%