chore(release): 1.0.2 [skip ci] ## [1.0.2](https://github.com/pycasbin/etcd-watcher/compare/v1.0.1...v1.0.2) (2022-07-25) ### Bug Fixes * update readme and requirements.txt ([#16](https://github.com/pycasbin/etcd-watcher/issues/16)) ([f11c2f5](https://github.com/pycasbin/etcd-watcher/commit/f11c2f5393cd838558adb32e4c98e14305020773))
Etcd Watcher is the Etcd watcher for pycasbin. With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.
pip install casbin-etcd-watcher
import casbin from etcd_watcher import new_watcher def update_callback_func(event): ... watcher = new_watcher(endpoints=["localhost", 2379], keyname="/casbin") watcher.set_update_callback(update_callback_func) e = casbin.Enforcer( get_examples("rbac_model.conf"), get_examples("rbac_policy.csv") ) e.set_watcher(watcher) # update_callback_func will be called e.save_policy()
This project is under Apache 2.0 License. See the LICENSE file for the full license text.