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

Uploaded Source

Built Distribution

casbin_postgresql_watcher-0.1.0-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.0.tar.gz.

File metadata

  • Download URL: casbin-postgresql-watcher-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9e59c0467b4a141c8707e2391c2781ab08eb1e0ad1e4f60896dcccd7d9bdee22
MD5 9ddf80adeb95f1f3a2bf2f09e59cbd9c
BLAKE2b-256 b93c4a455b9eb2f09c8ba92af4aa77312ae19b9980f4d13804d74f92b4145736

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casbin_postgresql_watcher-0.1.0-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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d5a6ad85f0e6f92b77a07d815a29cbaefc56ad2cb218ab3d5f70ef49cb37621
MD5 cc8e7cad2283eef27cc3ac39ecc397b0
BLAKE2b-256 3cd0e8b73847852ac91fb3a812bc784875e77e5c4ce82e59d75eda7e73dc688e

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