Skip to main content

etcd-watcher

tests Coverage Status Version PyPI - Wheel Pyversions Download Discord

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

Installation

pip install etcd-watcher

Simple Example

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()

Getting Help

License

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

Metadata

Release files for etcd-watcher 1.5.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 etcd-watcher 1.5.0
File Size Uploaded
etcd_watcher-1.5.0.tar.gz 366.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for etcd-watcher 1.5.0
File Interpreter ABI Platform
etcd_watcher-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 767.8 kB

Release files / etcd_watcher-1.5.0.tar.gz

Download URL etcd_watcher-1.5.0.tar.gz
Size 366.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a565a1cd3580a60f7e4b35b209bb8b3a65312ba94753f9cad353e7f01d973dad
BLAKE2b-256 checksum
How to use checksums
6ef182b90944952fca68b2f49fb0c78baad75a3d81a7d1ad619bebe9bc05ab6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / etcd_watcher-1.5.0-py3-none-any.whl

Download URL etcd_watcher-1.5.0-py3-none-any.whl
Size 401.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac04f4401c3845652a768aa6afb4354143ccf5e1a84aa1d97781eeadcad4319e
BLAKE2b-256 checksum
How to use checksums
84eea12540da0ba8c76b04a6860f2141e6d13c5966194b5f5543d5c571373836
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.5.0 This release

2 release files

1.4.0

2 release files

1.2.0

2 release files

1.1.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