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

Uploaded Source

Built Distribution

casbin_postgresql_watcher-0.1.1-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.1.tar.gz.

File metadata

  • Download URL: casbin-postgresql-watcher-0.1.1.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

Hashes for casbin-postgresql-watcher-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7b6a9d7ed9acc57176b521b76f3d371e8b54f9c8c26aa3574cb9f59e77eb6384
MD5 5dc7e294e25dcb36b4f1171e02c4d074
BLAKE2b-256 98e32fc4b3d464f12c31ca724b8c4da4c69b7e5c46358e72651fdd5296e908a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casbin_postgresql_watcher-0.1.1-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

Hashes for casbin_postgresql_watcher-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d0108d6b5c7460bb9851e865da8159ed2874db7c443e8176b5ca544782289163
MD5 f99d3aff342ea7df1d1d8943b09a4504
BLAKE2b-256 c26cfeff606431b5468d55188bc44e27334ccfb96c7c1d0030ef8a16b313f253

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