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)
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.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

casbin_postgresql_watcher-0.0.2-py2.py3-none-any.whl (7.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: casbin-postgresql-watcher-0.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

File hashes

Hashes for casbin-postgresql-watcher-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fa6027697a6f3ef6913c8ebc62f05d395c23aff7bcb6cc21f99ba3452a37b0de
MD5 f3fc53c84b907c970688ffe25fdd567d
BLAKE2b-256 feb0ce0182359928ffee3eacc69139b928ac78893ff81577399946d4f7a04b1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casbin_postgresql_watcher-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

File hashes

Hashes for casbin_postgresql_watcher-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09ec85fd8cc572a1f15f3c8bfd41eb9025a1e4e9231d7e492b89081d0975cf99
MD5 77ea87246c946598ed28fb2654b2968c
BLAKE2b-256 901b0515f589ad5dce0fa25bf27f184797157016543c441e2434af16db1a9ea4

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