chore(release): 0.0.2 [skip ci]

## [0.0.2](https://github.com/pycasbin/postgresql-watcher/compare/v0.0.1...v0.0.2) (2021-07-18)

### Bug Fixes

* CI release failed ([3dd60ea](https://github.com/pycasbin/postgresql-watcher/commit/3dd60ea6b34abab47ef67bae997a646fe4e5d7bd))
* fix `parent_conn` not initialize ([#11](https://github.com/pycasbin/postgresql-watcher/issues/11)) ([48001e0](https://github.com/pycasbin/postgresql-watcher/commit/48001e059d040a04f8f286ad2c6e2f383ea41895))
* Fix for more recent casbin versions and connection send fix ([#12](https://github.com/pycasbin/postgresql-watcher/issues/12)) ([8cc529c](https://github.com/pycasbin/postgresql-watcher/commit/8cc529c0036e6efc27c4d261b354e489a69ad6a4))
2 files changed
tree: 7e946c2d0d41ac9f7eef2cc2d0f9453b7b23921c
  1. .github/
  2. examples/
  3. postgresql_watcher/
  4. tests/
  5. .gitignore
  6. .releaserc.json
  7. CHANGELOG.md
  8. dev_requirements.txt
  9. LICENSE
  10. README.md
  11. requirements.txt
  12. setup.cfg
  13. setup.py
README.md

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)