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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa6027697a6f3ef6913c8ebc62f05d395c23aff7bcb6cc21f99ba3452a37b0de |
|
MD5 | f3fc53c84b907c970688ffe25fdd567d |
|
BLAKE2b-256 | feb0ce0182359928ffee3eacc69139b928ac78893ff81577399946d4f7a04b1d |
Close
Hashes for casbin_postgresql_watcher-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09ec85fd8cc572a1f15f3c8bfd41eb9025a1e4e9231d7e492b89081d0975cf99 |
|
MD5 | 77ea87246c946598ed28fb2654b2968c |
|
BLAKE2b-256 | 901b0515f589ad5dce0fa25bf27f184797157016543c441e2434af16db1a9ea4 |