Skip to main content
# Zookeeper-Watcher

Watches a designated node in Zookeeper for data or member changes.
Implements a Watch class which can be used as a decorator to trigger functions when changes are detected on a specified node in Zookeeper.

[![Latest Version](https://pypip.in/version/Zookeeper-Watcher/badge.png)]
(https://pypi.python.org/pypi/Zookeeper-Watcher/)
[![Downloads](https://pypip.in/download/Zookeeper-Watcher/badge.png)]
(https://pypi.python.org/pypi/Zookeeper-Watcher/)
[![Download format](https://pypip.in/format/Zookeeper-Watcher/badge.png)]
(https://pypi.python.org/pypi/Zookeeper-Watcher/)
[![License](https://pypip.in/license/Zookeeper-Watcher/badge.png)]
(https://pypi.python.org/pypi/Zookeeper-Watcher/)


## Supported Platforms

* OSX and Linux.
* Python 2.7

Probably works with other versions as well.

## Quickstart

Install:
```bash
pip install Zookeeper-Watcher
```

Example:
```python
from zookeeper_watcher import ZookeeperWatcher

#instantiate the watcher object by passing it the Zookeeper server address and a optional logger.
watcher = ZookeperWatcher('zookeeper_host:port') #can receive also a custom logger by adding logger=some_logger.

#start the async connection with the Zookeeper server
watcher.start()

#decorate a function that will be triggered once at runtime and on every detected event
@watcher.Watch('/zookeeper/path/to/the/node/that/we/want/to/watch')
def test_function(children, data):
"""decorated function that receives a list of children nodes of the given path
and a list of data objects (dictionaries) that are read from each child node"""
print "list of children nodes", children
print "list of data objects", data

```

## Changelog

#### 0.1.4

* Fixed some logging bugs.

#### 0.1.3

* Added custom logging.

#### 0.1.2

* Fixed some logging errors.

#### 0.1.1

* Fixed some distribution packaging bug.

#### 0.1.0

* Initial release.

Metadata

Release files for Zookeeper-Watcher 0.1.4

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

Source distribution (sdist)

Source distribution for Zookeeper-Watcher 0.1.4
File Size Uploaded Provenance Actions
Zookeeper-Watcher-0.1.4.tar.gz 4.3 kB Without provenance Details for Zookeeper-Watcher-0.1.4.tar.gz

Release files / Zookeeper-Watcher-0.1.4.tar.gz

Download URL Zookeeper-Watcher-0.1.4.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
03aeb902a53f7344faccd84e32076357fbccb495891f5924f5df38d1bf78eb1e
BLAKE2b-256 checksum
How to use checksums
91a06bf267795a98a28b6cc7aab6b9ae2e6ee7f4ed99d1311f2549cebb20351c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Zookeeper-Watcher 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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