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))
Casbin role watcher to be used for monitoring updates to casbin policies
pip install casbin-postgresql-watcher
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)