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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file casbin-postgresql-watcher-0.0.3.tar.gz.
File metadata
- Download URL: casbin-postgresql-watcher-0.0.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa99e204aeac474266f42bdac76b165ef019b13b79e136d37590048f88e3e9a2
|
|
| MD5 |
32032e5bb043052884bc2263bc87fa08
|
|
| BLAKE2b-256 |
23d9e12dd47a3e1700e8a7bc1f7a0df3825c891edaaa80c4acc33ce544192304
|
File details
Details for the file casbin_postgresql_watcher-0.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: casbin_postgresql_watcher-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c59efd081633ccb2dfa3aaaa56c1f1f2bd4e5de54911f8826b401673a87fad
|
|
| MD5 |
6986ca58ea14ac382edc6d4ac733470a
|
|
| BLAKE2b-256 |
6ad0de4f282af86778e1b807efd4679bc8a88b422c046e388ed0b40572dc6988
|