Eclipse Zenoh (pronounce /zeno/) is a lightweight, high-performance middleware that unifies data in motion, data at rest, and computations across diverse environments, from embedded systems to the cloud. The Python API (version 1.9.0) provides bindings to the core Rust implementation, enabling pub/sub, geo-distributed storage, queries, and computations. It maintains an active development and release cadence, with major updates often quarterly, aiming for performance and efficiency beyond mainstream stacks.
Install & Compatibility
Where this runs
tested against v1.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
build_error
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 1.8s · import 0.000s · 48MB
46MB installed
● package 46MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
import zenoh
config = zenoh.Config()
import zenoh
with zenoh.open(zenoh.Config()) as session:
publisher = session.declare_publisher(key)
subscriber = session.declare_subscriber(key, listener)
def listener(sample): ... print(sample.payload.to_string())
value_bytes = zenoh.ZBytes(b'hello')
This quickstart demonstrates a simple Zenoh publisher that periodically sends random temperature readings to the 'myhome/kitchen/temp' key expression. It uses a context manager to ensure the Zenoh session is properly closed. To observe the data, you would run a separate Zenoh subscriber.
import zenoh
import time
import random
import os
# Configure a Zenoh session (default configuration for local peer/client)
# For a router or specific configuration, consider loading from a file:
# config_file = os.environ.get('ZENOH_CONFIG_FILE', '')
# if config_file: config = zenoh.Config.from_file(config_file)
# else: config = zenoh.Config()
def read_temp():
return random.randint(15, 30)
if __name__ == "__main__":
# Open a Zenoh session using a context manager for proper cleanup
with zenoh.open(zenoh.Config()) as session:
key = 'myhome/kitchen/temp'
# Declare a publisher on the specified key expression
pub = session.declare_publisher(key)
print(f"Zenoh Publisher sending data to '{key}'...")
try:
while True:
t = read_temp()
buf = f"{t}"
pub.put(buf)
print(f"Putting Data ('{key}': '{buf}')...")
time.sleep(1)
except KeyboardInterrupt:
print("Publisher stopped.")
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.