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

This version

1.7.2

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.7.2.tar.gz (160.1 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.7.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl (9.4 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

eclipse_zenoh-1.7.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (9.3 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl (9.4 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (9.3 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

eclipse_zenoh-1.7.2-cp39-abi3-win_amd64.whl (7.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_28_aarch64.whl (9.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.4 MB view details)

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

eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (10.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (9.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

eclipse_zenoh-1.7.2-cp39-abi3-macosx_10_12_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

eclipse_zenoh-1.7.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (17.5 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.7.2-cp39-abi3-linux_armv6l.whl (9.4 MB view details)

Uploaded CPython 3.9+

File details

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

File metadata

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

File hashes

Hashes for eclipse_zenoh-1.7.2.tar.gz
Algorithm Hash digest
SHA256 cfcbc3fc9eb001be2b7adc303f34ae22570ff2e0f942d51973bfd30f4ac37d6a
MD5 144ee2dd116a00521976fc78dd546dda
BLAKE2b-256 75099534eea23b59cee13b5430c7874f71c5e800d412ac04572517733812b8f3

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.7.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 75ce69656a6ef21d414a82b90980abfa2d0fc98607e7f051cf912673e98be08a
MD5 4ee67b1069f4ba272d9e15abb3fbf165
BLAKE2b-256 07d9cfe6b59de5b3d139ceb6277afef0f0a505524eb83bf1295d449edb53d641

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.7.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9acfc65dbb83e94ed9c5f24f4539a045479948fa413ab4d33be99b06f7ae9da2
MD5 7103c668e9166cd80298d1877538b730
BLAKE2b-256 ad23229ebcb1554b068bf9aa56e4440b6d66e80458240fd8d7cb46f3b179ccef

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0aff00541e849360d5854090853f9997a60583c803623a944e07e7c60af0b6b7
MD5 d3175651e67cf8b94e95a70ba5019102
BLAKE2b-256 6402018baf3f6a9edbde861014083fed61417189c649801644b88e9400116657

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 dbfac8f263d2c83026387dad501f8f8cb5add0f6089d5340d231ae5fcc5b55bd
MD5 1cca129b24f993b79a34f98e734792eb
BLAKE2b-256 81bbac3d7fea2167fcbe568084d4046c498dfa2b461740bc8eb0a0ce87971ded

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 af3c857bcb964b000e770e3f758a8920e270ee32e79f67f25f845c51f258cc90
MD5 bf74feee4533905947203108db4742ce
BLAKE2b-256 d7d587a56e70a25fac485988efc45b27d7b31c2d228039dfef44e5ddd67fd343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 07cf23f7de43a9008f9dd81bf5028a0459e43227087bc7838a0ba36c1eb232e7
MD5 f329c53e215d7b0b93ddcf0f5fa82215
BLAKE2b-256 8d4aad58417a73271e1a667b8bec1f6d42b500c0966c5e48a10c321e8c3f4634

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ede3dfb4072577e9a81f466364b9293be345801db9734bf0b3f7321194190035
MD5 b359b377e03aee5110dc279800af5ad7
BLAKE2b-256 638c39ea3c158ca403f3acb915dacd80787ac1afd0ce6d2be66a92d0dc2dd1ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 296885d49ef20e3e14777007e3ff519403ec4c0c9e4358b70bb2157985b29548
MD5 5fb436afabf0f83f6101091241f9b4e7
BLAKE2b-256 fe769520c1c583013bf8eefcd037c307615f5513592ba12166ec91fedefefbf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8e53005eae75b3edac44d7f46d9678be784a67657f3dd871f5efabf351081a41
MD5 04670b26ff018101da641863ab2aff29
BLAKE2b-256 b4d3d1a7cfa1894baf801323423e56ab79fd17c39af922b6aad1a01aa5b4a57a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d0429933d9abeb70939a2cb02e32b8c8929651fd1762f1308b5fbd4ae41c3d9
MD5 ad26dd7d6c703e5ecaf5b41da04a46a0
BLAKE2b-256 068a6bb29455e16f119ec9db996d50f5ce40fdd7e1369fcfb6665144b50a0b7b

See more details on using hashes here.

File details

Details for the file eclipse_zenoh-1.7.2-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.7.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d068c7ce2cb4f5ffe965f2d103f7173de732733a5102b6968313cedea1704694
MD5 86417ced8480721311625621a4ef84e8
BLAKE2b-256 7691484df5bdfd42102f9b5d99654c67f318d4967f3828dfd297d88c1262e143

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eclipse_zenoh-1.7.2-cp39-abi3-linux_armv6l.whl
Algorithm Hash digest
SHA256 194ee61191a126e544b264587eb3659ae3952e9126e74d2d4a6e6f2ba163920a
MD5 7ff0e6fc0265b0f53cd43c99e1f5c776
BLAKE2b-256 8548a52169789207ff80f3b1d7f768c901fa117bd729ed665b37736b68ca2699

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