chore(release): 0.1.2 [skip ci] ## [0.1.2](https://github.com/pycasbin/postgresql-watcher/compare/v0.1.1...v0.1.2) (2022-05-17) ### Bug Fixes * made should_reload into a blocking call ([#21](https://github.com/pycasbin/postgresql-watcher/issues/21)) ([6fd89b5](https://github.com/pycasbin/postgresql-watcher/commit/6fd89b5001ccc4e6782294489c40464cfebbf32c))
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, dbname=DBNAME) watcher.set_update_callback(casbin_enforcer.e.load_policy) casbin_enforcer.set_watcher(watcher)