kazoo
"Higher Level Zookeeper Client"
What it is and what it does
Kazoo is a Python client library that wraps Apache ZooKeeper's lower-level protocol with a more Pythonic, higher-level API. It handles the complexity of connecting to ZooKeeper clusters, managing sessions, and implementing common distributed patterns like leader election, distributed locks, and configuration management. The package has no runtime dependencies and installs cleanly as a pure-Python wheel.
Developers use Kazoo when building distributed systems that need coordination across multiple nodes—for example, electing a leader among service instances, managing shared configuration that updates across a cluster, or implementing distributed locks for resource access. The library abstracts away ZooKeeper's connection management and event handling, letting you focus on the coordination logic itself.
Use it for:
- Implement distributed leader election to ensure only one instance of a service runs at a time across a cluster
- Manage shared configuration that multiple services read and watch for changes in real time
- Build distributed locks to coordinate access to shared resources or prevent concurrent operations
- Implement service discovery by registering and discovering service endpoints in a ZooKeeper ensemble
- Coordinate job scheduling or task distribution across multiple worker nodes
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Kazoo provides a higher-level Python client API for Apache ZooKeeper, simplifying coordination, configuration management, and distributed locking operations.
Yes. Kazoo is actively maintained, has no external dependencies, and is the standard Python client for ZooKeeper. It's production-stable (Development Status 5), supports modern Python versions (3.8–3.14), and carries no known security vulnerabilities. Install it if you're building on ZooKeeper for coordination; skip it only if you don't need ZooKeeper or prefer a different coordination backend.
Install
kazoo on PyPI
pip
pip install kazoouv
uv add kazoopoetry
poetry add kazooInstalling kazoo
Before you install
Low friction installation with no runtime dependencies. Actively maintained as of 2026-03-21 with recent commits addressing Python 3.13 and 3.14 support, SNI support, and bug fixes.
License in practice
Apache 2.0 is permissive; you can use this package in commercial and proprietary projects with minimal restrictions, though you must include a copy of the license and note any modifications.
Quickstart
pip install kazoo
from kazoo.client import KazooClient
zk = KazooClient(hosts='localhost')
zk.start()
zk.create('/my_node', b'data')
zk.stop()
Requires a running Apache ZooKeeper server instance to connect to.
Verify before relying
- Whether SNI support added in 2.11.0 covers all modern TLS/SSL scenarios for production deployments
- Performance characteristics and scalability limits for high-throughput distributed locking scenarios
- Compatibility with specific ZooKeeper server versions beyond what the changelog indicates
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 146 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,117,261/month — #1,968 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kazoo-2.11.0-py2.py3-none-any.whl
Keywords: zookeeper, lock, leader, configuration
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
toozTooz provides a coordination API for…
permissive · top 15,000 on PyPI
aioredlockImplements the Redlock distributed lock…
permissive · top 15,000 on PyPI
zc.lockfileProvides portable inter-process locks…
unclear · top 5,000 on PyPI
python-dynamodb-lockProvides distributed locking on top of DynamoDB…
permissive · top 15,000 on PyPI
redlock-pyImplements Redis-based distributed locks using…
permissive · top 15,000 on PyPI
patroniPatroni orchestrates PostgreSQL…
permissive · top 15,000 on PyPI
PyMySQLLockProvides distributed locking primitives backed…
permissive · top 15,000 on PyPI
lockfileProvides a platform-independent file locking…
permissive · top 1,000 on PyPI