Skip to main content

rabbitmq-watcher

Build Status Coverage Status Version PyPI - Wheel Pyversions Download Discord

Rabbitmq Watcher is the rabbitmq watcher for pycasbin. With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.

Installation

pip install casbin-rabbitmq-watcher

Simple Example

import os

import casbin
from casbin_rabbitmq_watcher import new_watcher


def get_examples(path):
    examples_path = os.path.split(os.path.realpath(__file__))[0] + "/../examples/"
    return os.path.abspath(examples_path + path)


def update_callback_func(msg):
    ...


watcher = new_watcher()
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()

Getting Help

License

This project is under Apache 2.0 License. See the LICENSE file for the full license text.

Metadata

Release files for casbin-rabbitmq-watcher 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for casbin-rabbitmq-watcher 1.7.0
File Size Uploaded
casbin_rabbitmq_watcher-1.7.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for casbin-rabbitmq-watcher 1.7.0
File Interpreter ABI Platform
casbin_rabbitmq_watcher-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / casbin_rabbitmq_watcher-1.7.0.tar.gz

Download URL casbin_rabbitmq_watcher-1.7.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c810c2607109700b8147d1042c5ce763b04f1cda59710e83d7717d4169f2588d
BLAKE2b-256 checksum
How to use checksums
09a640c91b427ed2a1dda610484cbf441b37ea0654b7cfca92515eba18465446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / casbin_rabbitmq_watcher-1.7.0-py3-none-any.whl

Download URL casbin_rabbitmq_watcher-1.7.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4abac7d288b23ff15dce0f6eb8ac189b11d6447262178f1c9d10fcb0e5e6fcf
BLAKE2b-256 checksum
How to use checksums
b521d0558a96e7fe34c15b2a6c65f33da9cf8c2942002705d9241de51d2f1a35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page