{"id":22959844,"url":"https://github.com/pycasbin/etcd-watcher","last_synced_at":"2025-08-13T05:32:41.358Z","repository":{"id":40388622,"uuid":"287686275","full_name":"pycasbin/etcd-watcher","owner":"pycasbin","description":"Etcd Watcher for PyCasbin","archived":false,"fork":false,"pushed_at":"2024-03-29T12:17:50.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-06T04:49:43.534Z","etag":null,"topics":["abac","acl","auth","authz","casbin","etcd","pycasbin","python","rbac","watcher"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/pycasbin","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pycasbin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-15T05:49:12.000Z","updated_at":"2024-03-29T11:27:17.000Z","dependencies_parsed_at":"2022-07-12T18:01:41.427Z","dependency_job_id":null,"html_url":"https://github.com/pycasbin/etcd-watcher","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fetcd-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fetcd-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fetcd-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fetcd-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pycasbin","download_url":"https://codeload.github.com/pycasbin/etcd-watcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229740051,"owners_count":18116882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abac","acl","auth","authz","casbin","etcd","pycasbin","python","rbac","watcher"],"created_at":"2024-12-14T18:29:00.397Z","updated_at":"2024-12-14T18:29:01.005Z","avatar_url":"https://github.com/pycasbin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# etcd-watcher\n\n[![tests](https://github.com/pycasbin/etcd-watcher/actions/workflows/release.yml/badge.svg)](https://github.com/pycasbin/etcd-watcher/actions/workflows/release.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pycasbin/etcd-watcher/badge.svg)](https://coveralls.io/github/pycasbin/etcd-watcher)\n[![Version](https://img.shields.io/pypi/v/casbin-etcd-watcher.svg)](https://pypi.org/project/casbin-etcd-watcher/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin-etcd-watcher.svg)](https://pypi.org/project/casbin-etcd-watcher/)\n[![Pyversions](https://img.shields.io/pypi/pyversions/casbin-etcd-watcher.svg)](https://pypi.org/project/casbin-etcd-watcher/)\n[![Download](https://img.shields.io/pypi/dm/casbin-etcd-watcher.svg)](https://pypi.org/project/casbin-etcd-watcher/)\n[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord\u0026label=discord\u0026color=5865F2)](https://discord.gg/S5UjpzGZjN)\n\nEtcd Watcher is the [Etcd](https://github.com/coreos/etcd) watcher for [pycasbin](https://github.com/casbin/pycasbin). With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.\n\n## Installation\n\n    pip install casbin-etcd-watcher\n\n## Simple Example\n\n```python\nimport casbin\nfrom etcd_watcher import new_watcher\n\ndef update_callback_func(event):\n    ...\n\nwatcher = new_watcher(endpoints=[\"localhost\", 2379], keyname=\"/casbin\")\nwatcher.set_update_callback(update_callback_func)\n\ne = casbin.Enforcer(\n\tget_examples(\"rbac_model.conf\"), get_examples(\"rbac_policy.csv\")\n)\n\ne.set_watcher(watcher)\n# update_callback_func will be called\ne.save_policy()\n```\n\n## Getting Help\n\n- [Casbin](https://github.com/casbin/pycasbin)\n\n## License\n\nThis project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycasbin%2Fetcd-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycasbin%2Fetcd-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycasbin%2Fetcd-watcher/lists"}