Skip to main content

Casbin role watcher to be used for monitoring updates to policies for PyCasbin

Project description

postgresql-watcher

tests Coverage Status Version PyPI - Wheel Download Gitter

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, dbname=DBNAME)
watcher.set_update_callback(casbin_enforcer.e.load_policy)
casbin_enforcer.set_watcher(watcher)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

casbin-postgresql-watcher-0.1.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

casbin_postgresql_watcher-0.1.2-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file casbin-postgresql-watcher-0.1.2.tar.gz.

File metadata

File hashes

Hashes for casbin-postgresql-watcher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5d2a04d10031283856986db4434a92300f9b4a8f241204c30f65b314b9e4e741
MD5 554e4809e8a4752cf5b77500b8579b22
BLAKE2b-256 c8f52d15128ea77d035f448f58b42e73ea7c0473288bc17460f345fa77a05afe

See more details on using hashes here.

File details

Details for the file casbin_postgresql_watcher-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for casbin_postgresql_watcher-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 159b344cc27e1310a4b0a5921e9c121e87cd5da9b32efc78b5bcecec6e88df83
MD5 604d2a6e0913b75f2729b3e3252327fa
BLAKE2b-256 e92edebec3ee39c5a690384b6615208a35c70c612f6d9701247311dcd637cee9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page