Skip to main content

pamoja-zenoh

Zenoh key expressions: validity, canonical form, and wildcard matching. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.

read the guide documentation API reference

Install

pip install pamoja-zenoh
from pamoja import zenoh

This pulls in pamoja-native, the compiled engine. pip install pamoja is the whole framework in one package.

Example

The script the test suite runs, spliced here as it ran.

From bindings/python/guides/zenoh.py:

from pamoja.zenoh import canonize, is_canon, is_valid, matches

# A key expression names a set of keys. `*` stands for exactly one chunk, so this selects
# the battery of any node, and not a battery nested deeper.
any_node = "fleet/*/battery"
for key in ("fleet/n7/battery", "fleet/n7/rack/battery"):
    print(f"{any_node} covers {key}: {matches(any_node, key)}")

# `**` stands for any number of chunks, including none, which is what a subscription
# covering a whole subtree wants.
print(f"fleet/** covers a nested key: {matches('fleet/**', 'fleet/n7/rack/battery')}")
print(f"fleet/**/battery covers fleet/battery: {matches('fleet/**/battery', 'fleet/battery')}")

# Two expressions that select the same keys have one canonical form. Comparing or routing
# on the written form would treat these as different subscriptions.
written = "fleet/**/**/battery"
canonical = canonize(written)
print(f"{written} is canonical: {is_canon(written)}, and canonizes to {canonical}")

# A malformed expression is rejected rather than canonized into something plausible.
malformed = "fleet//battery"
print(f"{malformed} is valid: {is_valid(malformed)}, canonizes to {canonize(malformed)}")

The same capability in every language

Language Package Reference
Rust pamoja-zenoh reference, docs.rs, install
TypeScript @pamoja/zenoh reference, install
Python pamoja-zenoh reference, install
C# Pamoja.Zenoh reference, install

Documentation

License

MIT

Release files for pamoja-zenoh 0.1.18

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

Source distribution (sdist)

Source distribution for pamoja-zenoh 0.1.18
File Size Uploaded
pamoja_zenoh-0.1.18.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pamoja-zenoh 0.1.18
File Interpreter ABI Platform
pamoja_zenoh-0.1.18-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / pamoja_zenoh-0.1.18.tar.gz

Download URL pamoja_zenoh-0.1.18.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
32dc7ea0788284fb7587d9609ed7ffadd04453b3b931cbb49e18d8fca7ccbf95
BLAKE2b-256 checksum
How to use checksums
6db93fa518e6fcfe2023f6fc1d6d0c235322bdd57d3eb23ef0ecb07a765a3558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / pamoja_zenoh-0.1.18-py3-none-any.whl

Download URL pamoja_zenoh-0.1.18-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbb9d086c15771900f064db12dae0d0745de61de8d058e15d6e6ec55c7166e18
BLAKE2b-256 checksum
How to use checksums
d0800cb09a13c4ecb6da152109a412601919adeb409022a5eea907a30fec800f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.18 This release

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