Skip to main content

The Zenoh Python API

Project description

CI Documentation Status Discussion Discord License License

Eclipse Zenoh

The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.

Zenoh (pronounce /zeno/) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.

Check the website zenoh.io and the roadmap for more detailed information.


Python API

This repository provides a Python binding based on the main Zenoh implementation written in Rust.


How to install it

The Eclipse zenoh-python library is available on Pypi.org. Install the latest available version using pip in a virtual environment:

pip install eclipse-zenoh

:warning:WARNING:warning: zenoh-python is developped in Rust. On Pypi.org we provide binary wheels for the most common platforms (Linux x86_64, i686, ARMs, MacOS universal2 and Windows amd64). But also a source distribution package for other platforms. However, for pip to be able to build this source distribution, there are some prerequisites:

  • pip version 19.3.1 minimum (for full support of PEP 517). (if necessary upgrade it with command: 'sudo pip install --upgrade pip' )
  • Have a Rust toolchain installed (instructions at rustup.rs)

Supported Python versions and platforms

zenoh-python has been tested with Python 3.8, 3.9, 3.10, 3.11 and 3.12

It relies on the zenoh Rust API which require the full std library. See the list in Rust Platform Support.

Enable zenoh features

To enable some compilation features of the Rust library that are disabled by default, for example shared-memory, execute the following command:

pip install eclipse-zenoh --no-binary :all: --config-settings build-args="--features=zenoh/shared-memory"

How to build it

Requirements:

  • Python >= 3.8

  • pip >= 19.3.1

  • Rust and Cargo. If you already have the Rust toolchain installed, make sure it is up-to-date with:

    rustup update
    

Recommended: Build with Virtual Environment

Using a virtual environment is strongly recommended to avoid Python version conflicts and dependency issues.

  1. Create and activate a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  2. Install development requirements:

    pip install -r requirements-dev.txt
    
  3. Build and install in development mode:

    maturin develop --release
    
  4. Run examples:

    python examples/z_info.py
    

When you're done, deactivate the virtual environment:

deactivate

Alternative: Build without Virtual Environment

If you cannot use a virtual environment, follow these steps carefully:

  1. Install development requirements:

    pip install -r requirements-dev.txt
    
  2. Ensure your system can find the building tool maturin (installed by previous step). For example, it is placed at $HOME/.local/bin/maturin by default on Ubuntu 20.04.

    export PATH="$HOME/.local/bin:$PATH"
    
  3. Build the wheel:

    maturin build --release
    
  4. Install the built wheel:

    pip install ./target/wheels/*.whl --break-system-packages
    

    :warning: Important: Systems may have multiple Python installations. Ensure you use the same pip that corresponds to the python3 you intend to use for running examples. You can verify this with:

    pip --version      # Shows which Python version pip uses
    python3 --version  # Shows which Python version python3 uses
    

    If they don't match, use python3 -m pip install ./target/wheels/*.whl instead to ensure the package is installed for the correct Python version.

  5. Run examples using the same Python:

    python3 examples/z_info.py
    

Building Documentation

To build the documentation locally:

  1. Ensure you have zenoh-python installed (follow the build instructions above)

  2. Install documentation requirements:

    pip install -r docs/requirements.txt
    
  3. Build the HTML documentation:

    cd docs
    make html
    
  4. Open the documentation:

    open _build/html/index.html  # macOS
    # or
    xdg-open _build/html/index.html  # Linux
    # or navigate to docs/_build/html/index.html in your browser
    

The documentation is also available online at zenoh-python.readthedocs.io.


Running the Examples

You can install Zenoh Router first (See the instructions). Then, run the zenoh-python examples following the instructions in examples/README.md

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eclipse_zenoh-1.9.0.tar.gz (164.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

eclipse_zenoh-1.9.0-cp39-abi3-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.9+Windows x86-64

eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_28_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (11.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (10.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (19.9 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

eclipse_zenoh-1.9.0-cp39-abi3-linux_armv6l.whl (10.7 MB view details)

Uploaded CPython 3.9+

File details

Details for the file eclipse_zenoh-1.9.0.tar.gz.

File metadata

  • Download URL: eclipse_zenoh-1.9.0.tar.gz
  • Upload date:
  • Size: 164.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eclipse_zenoh-1.9.0.tar.gz
Algorithm Hash digest
SHA256 b0477ab431132ebfe1096eccac13ea0066d50d1528d726c8872c00e0345070d1
MD5 b90263c2c07bb62f219d2482098a9260
BLAKE2b-256 d942c8502d0e77f74b9cf4c192a01e620b3d15273d371464485796807d202d9d

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5dfb352eca4585b85edbbc84c6db58906008e202823ca280496c0b867f9719f0
MD5 62072de24323df9af2a1b22a5d040537
BLAKE2b-256 2616a94c4f37e3a088faadf4b5fbc64e5f69dea1023dc7efc49b3be0e0ecc953

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8c139a43706c8ff3c94fa625008af8667687c161a8395ad1fa3faff29c16fae4
MD5 98f99b50a89b51482135ed79e00542bc
BLAKE2b-256 ab33c3116f1bf7647ee0ea8972efbe0fe5710ae75ea7226440a8fda7f04a4cbc

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43299593891cfd648bca4b2aa00f3dca916508a49a0c9e6960902e6e867b247e
MD5 09e96a56fa83dcfbcee7921edef38e48
BLAKE2b-256 581b2a074d4f4595bd37c3d12f1b2ad49bceef5c8cd0962cbfd97d1d39f32e1f

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3a1fe847225cda21e3e74677cfd4ddfd2e72600d5a56968d4229d981c67f78d4
MD5 63d07e681476b9639448fb80e7344043
BLAKE2b-256 f02fbe614f1f7f4e046da2764cd36227d19db3655839219744ce7a12e6e2dae6

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 949d82851bc9e3ad646fd1307ee544ed23359dcfd18d4065075fc592f6ab6fa7
MD5 b40911eb8f8566aba505d5fd9de46bda
BLAKE2b-256 275728e66893801b63df36fea355a64b6fc22637e1148a952ee11e3039ae955e

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 180dd2a6da3b86b52e87f5e470a1f8a86db03c519978b22ffb1dc7c11f98ef3b
MD5 fb9b03d382c3b8ad61d90272f4dd5718
BLAKE2b-256 7b6a42b83b4e8c262ebbb3bcae702394478326c807f54b3162130b0a603e1a01

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 6f66059b12e1ec53c70bc25192b0e74502751759064726dbb153ed6dd8f4dc8b
MD5 5fd5615f872281a5131f006ee9fe82a8
BLAKE2b-256 05c5ee0815c7ec49c5a29307cd935478305159bb3f0b2489f8c54fc6db3fdf36

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.9.0-cp39-abi3-linux_armv6l.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.9.0-cp39-abi3-linux_armv6l.whl
Algorithm Hash digest
SHA256 15b6f37c407617ea4de32d32835cbcab4d1a116b892477490fc6c10a7d27c73b
MD5 a482ba8ea729359b365b082738dc4037
BLAKE2b-256 e73b22b9104b0a022bd2b1627b4866876831585eda2eacb9ca1f3b4b8e847945

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page