Casbin role watcher to be used for monitoring updates to policies for PyCasbin
Project description
postgresql-watcher
Casbin role watcher to be used for monitoring updates to casbin policies
Installation
pip install casbin-postgresql-watcher
Basic Usage Example
With Flask-authz
from flask_authz import CasbinEnforcer
from postgresql_watcher import PostgresqlWatcher
from flask import Flask
from casbin.persist.adapters import FileAdapter
casbin_enforcer = CasbinEnforcer(app, adapter)
watcher = PostgresqlWatcher(host=HOST, port=PORT, user=USER, password=PASSWORD)
watcher.set_update_callback(casbin_enforcer.e.load_policy())
casbin_enforcer.set_watcher(watcher)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for casbin-postgresql-watcher-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa99e204aeac474266f42bdac76b165ef019b13b79e136d37590048f88e3e9a2 |
|
MD5 | 32032e5bb043052884bc2263bc87fa08 |
|
BLAKE2b-256 | 23d9e12dd47a3e1700e8a7bc1f7a0df3825c891edaaa80c4acc33ce544192304 |
Close
Hashes for casbin_postgresql_watcher-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7c59efd081633ccb2dfa3aaaa56c1f1f2bd4e5de54911f8826b401673a87fad |
|
MD5 | 6986ca58ea14ac382edc6d4ac733470a |
|
BLAKE2b-256 | 6ad0de4f282af86778e1b807efd4679bc8a88b422c046e388ed0b40572dc6988 |