{"id":22666644,"url":"https://github.com/officialpycasbin/rabbitmq-watcher","last_synced_at":"2026-02-21T04:03:54.769Z","repository":{"id":262356319,"uuid":"886986327","full_name":"officialpycasbin/rabbitmq-watcher","owner":"officialpycasbin","description":"RabbitMQ Watcher for PyCasbin","archived":false,"fork":false,"pushed_at":"2025-02-26T13:39:13.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T09:53:05.356Z","etag":null,"topics":["abac","acl","auth","authorization","authz","casbin","middleware","pycasbin","rabbitmq","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/officialpycasbin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T01:04:14.000Z","updated_at":"2025-02-26T13:39:15.000Z","dependencies_parsed_at":"2024-11-12T02:18:43.365Z","dependency_job_id":"478b335d-2189-498b-b262-4a79d81db88a","html_url":"https://github.com/officialpycasbin/rabbitmq-watcher","commit_stats":null,"previous_names":["officialpycasbin/rabbitmq-watcher"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/officialpycasbin%2Frabbitmq-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/officialpycasbin%2Frabbitmq-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/officialpycasbin%2Frabbitmq-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/officialpycasbin%2Frabbitmq-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/officialpycasbin","download_url":"https://codeload.github.com/officialpycasbin/rabbitmq-watcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550636,"owners_count":21122932,"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","authorization","authz","casbin","middleware","pycasbin","rabbitmq","rbac","watcher"],"created_at":"2024-12-09T14:17:20.401Z","updated_at":"2025-04-12T09:53:14.551Z","avatar_url":"https://github.com/officialpycasbin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rabbitmq-watcher\n\n[![Build Status](https://github.com/officialpycasbin/rabbitmq-watcher/actions/workflows/build.yml/badge.svg)](https://github.com/officialpycasbin/rabbitmq-watcher/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/officialpycasbin/rabbitmq-watcher/badge.svg)](https://coveralls.io/github/officialpycasbin/rabbitmq-watcher)\n[![Version](https://img.shields.io/pypi/v/casbin-rabbitmq-watcher.svg)](https://pypi.org/project/casbin-rabbitmq-watcher/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin-rabbitmq-watcher.svg)](https://pypi.org/project/casbin-rabbitmq-watcher/)\n[![Pyversions](https://img.shields.io/pypi/pyversions/casbin-rabbitmq-watcher.svg)](https://pypi.org/project/casbin-rabbitmq-watcher/)\n[![Download](https://img.shields.io/pypi/dm/casbin-rabbitmq-watcher.svg)](https://pypi.org/project/casbin-rabbitmq-watcher/)\n[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord\u0026label=discord\u0026color=5865F2)](https://discord.gg/S5UjpzGZjN)\n\nRabbitmq Watcher is the rabbitmq watcher for pycasbin. With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.\n\n## Installation\n\n```bash\npip install casbin-rabbitmq-watcher\n```\n\n## Simple Example\n\n```python\nimport os\n\nimport casbin\nfrom casbin_rabbitmq_watcher import new_watcher\n\n\ndef get_examples(path):\n    examples_path = os.path.split(os.path.realpath(__file__))[0] + \"/../examples/\"\n    return os.path.abspath(examples_path + path)\n\n\ndef update_callback_func(msg):\n    ...\n\n\nwatcher = new_watcher()\nwatcher.set_update_callback(update_callback_func)\n\ne = casbin.Enforcer(\n    get_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%2Fofficialpycasbin%2Frabbitmq-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofficialpycasbin%2Frabbitmq-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofficialpycasbin%2Frabbitmq-watcher/lists"}