Skip to main content

Eclipse Cyclone DDS Python binding

Project description

License License Website PyPI - Python Version PyPI Community

Python binding for Eclipse Cyclone DDS

A Python binding for Eclipse Cyclone DDS.

Getting Started

Eclipse CycloneDDS Python requires Python version 3.7 or higher. You can install with included Cyclone DDS binaries or leveraging an existing Cyclone DDS installation by installing from source via PyPi.

Documentation can be found on the cyclonedds.io website: Python API docs

Installing with pre-built Cyclone DDS binaries

This is the most straightforward method to install Cyclone DDS Python, but there are a couple of caveats. The pre-built package:

  • has no support for DDS Security,
  • has no support for shared memory via Iceoryx,
  • comes with generic Cyclone DDS binaries that are not optimized per-platform.

If these are of concern, proceed with an installation from source. If not, running this installation is as simple as:

    $ pip install cyclonedds

You can also use the nightly build stream instead, which is built from the master branches of cyclonedds and cyclonedds-python. This will always get you the latest and greatest, but less stable version that might contain API breaks.

    $ pip install cyclonedds-nightly

Installing from source

When installing from source you can make use of the full list of features offered by Cyclone DDS. First install Cyclone DDS as normal. Make sure that Cyclone DDS is built with the ENABLE_TYPELIB option set to ON (the default for this option). Then continue by setting the CYCLONEDDS_HOME environment variable to the installation location of Cyclone DDS, which is the same as what was used for CMAKE_INSTALL_PREFIX. You will have to have this variable active any time you run Python code that depends on cyclonedds so adding it to .bashrc on Linux, ~/bash_profile on MacOS or the System Variables in Windows can be helpful. This also allows you to switch, move or update Cyclone DDS without recompiling the Python package.

You'll need the Python development headers to complete the install. If using apt, try sudo apt install python3-dev. For other distributions, see this comment.

via PyPi

You can install the source from the latest release from Pypi, or use a tag to get a specific version. A full example (for linux) is shown below

$ git clone https://github.com/eclipse-cyclonedds/cyclonedds
$ cd cyclonedds && mkdir build install && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=../install
$ cmake --build . --config RelWithDebInfo --target install
$ cd ..
$ export CYCLONEDDS_HOME="$(pwd)/install"
$ pip3 install cyclonedds --no-binary cyclonedds

via git

A full example installation of the quickest way to get started via git is shown below:

$ git clone https://github.com/eclipse-cyclonedds/cyclonedds
$ cd cyclonedds && mkdir build install && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=../install
$ cmake --build . --config RelWithDebInfo --target install
$ cd ..
$ export CYCLONEDDS_HOME="$(pwd)/install"
$ pip3 install git+https://github.com/eclipse-cyclonedds/cyclonedds-python

Command line tooling

The Python package contains a suite of command line tools, all nested under the main entrypoint cyclonedds. The main help screen shows the commands available:

cyclonedds --help

cyclonedds ls

cyclonedds ls --help

The ls subcommand shows you the entities in your DDS system and their QoS settings. For example, here is the output when running the Vehicle example from this repo in the background:

cyclonedds ls --suppress-progress-bar --force-color-mode

cyclonedds ps

cyclonedds ps --help

The ps subcommand shows you the applications in your DDS system. Note that this depends on so called 'Participant Properties', tactfully named QoS properties in DDS participants. These were merged into CycloneDDS for version 0.10.0. Here is an example of the output when running the Vehicle example from this repo in the background on a single host:

cyclonedds ps --suppress-progress-bar --force-color-mode

cyclonedds typeof

cyclonedds typeof --help

The typeof subcommand shows you the type(s) of a topic in your system. With XTypes it can happen that more than one type for each topic exists and that they are still compatible. The types are represented in IDL. Here is an example of the output when running the Vehicle example:

cyclonedds typeof Vehicle --suppress-progress-bar --force-color-mode

cyclonedds subscribe

cyclonedds subscribe --help

The subscribe subcommand dynamically subscribes to a topic and shows you the data as it arrives. The type is discovered in a similar manner as typeof. Here is an example of the output when running the Vehicle example:

timeout -s INT 10s cyclonedds subscribe Vehicle --suppress-progress-bar --force-color-mode

cyclonedds publish

cyclonedds publish --help

The publish subcommand dynamically builds a REPL with datatypes and a writer for a topic and shows you the data as it arrives. The type is discovered in a similar manner as typeof.

cyclonedds performance

cyclonedds performance --help

The performance subcommand is a nicer frontend to ddsperf with four modes: publish, subscribe, ping and pong. The below performance run example is the cyclonedds performance subscribe mode rendered with cyclonedds performance publish running in the background.

cyclonedds performance --duration 21s --render-output-once-on-exit --force-color-mode subscribe --triggering-mode waitset

Contributing

We very much welcome all contributions to the project, whether that is questions, examples, bug fixes, enhancements or improvements to the documentation, or anything else really. When considering contributing code, it might be good to know that build configurations for Azure pipelines are present in the repository and that there is a test suite using pytest, along with flake8 code linting, and documentation built with sphinx. Be sure to install with the Extra dependencies if you're going to run tests, lints or build the docs.

You can run the test suite and linting using the local-ci.py script in this repo.

$ python local-ci.py

Or lint a single file/directory (as the whole repo can be a little noisey) using:

$ python -m flake8 path/to/some_file.py

You can build and serve the documentation (at http://localhost:8000/) using:

cd docs
python -m sphinx source/ _build/
# Serve the HTML files to view at localhost:8000
python -m http.server -d _build

Extra dependencies

The cyclonedds package defines two sets of optional dependencies, dev and docs, used for developing cyclonedds and building the documentation, respectively. If you want to install with development tools add the component to your installation, for example:

$ pip3 install --user "cyclonedds[dev] @ git+https://github.com/eclipse-cyclonedds/cyclonedds-python"

Or when installing from a local git clone, which is recommended when developing or building the docs:

$ cd /path/to/git/clone
# for development:
$ pip3 install --user ".[dev]"
# for documentation generation
$ pip3 install --user ".[docs]"
# or for both
$ pip3 install --user ".[dev,docs]"

For more information see the packaging guide information on optional dependencies.

PyOxidizer build

You can build a self-contained binary of the cyclonedds CLI tool using PyOxidizer. It should be as simple as:

$ cd /path/to/git/clone
$ pip3 install --user pyoxidizer
$ pyoxidizer build

Project details


Download files

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

Source Distribution

cyclonedds-nightly-2025.4.8.tar.gz (165.2 kB view details)

Uploaded Source

Built Distributions

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

cyclonedds_nightly-2025.4.8-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2025.4.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_11_0_arm64.whl (834.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_10_9_x86_64.whl (908.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

cyclonedds_nightly-2025.4.8-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2025.4.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_11_0_arm64.whl (834.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_10_9_x86_64.whl (908.4 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

cyclonedds_nightly-2025.4.8-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2025.4.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_11_0_arm64.whl (834.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_10_9_x86_64.whl (908.3 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

cyclonedds_nightly-2025.4.8-cp37-cp37m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2025.4.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.4.8-cp37-cp37m-macosx_10_9_x86_64.whl (908.2 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file cyclonedds-nightly-2025.4.8.tar.gz.

File metadata

  • Download URL: cyclonedds-nightly-2025.4.8.tar.gz
  • Upload date:
  • Size: 165.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for cyclonedds-nightly-2025.4.8.tar.gz
Algorithm Hash digest
SHA256 16026b33cb11a63ffc2bfbe6f169d19ce35f14a2dcecc0baec4da107fb6e58f5
MD5 115ceb85f81e2d0cce000060e883e50a
BLAKE2b-256 f5adc7ccfc6372a8ffdda464887771448ecb9b0672fbeb818c250015fc4c3256

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 464c5dbd098b8f69e0d5a9c1613017eea4106d6a19deaa284a3bccffbefdfd6e
MD5 a7eaf4b480a10c97c093eea74bdb9dd9
BLAKE2b-256 59e1a7986366974f69ce8199fb1be87b820104d44e5de1f62e132aa7fa55f047

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94dc52c397312f7a04dac99c7a360d3b02b993ee3a5d41f71f2c42f430f4c851
MD5 4e354be52c6aa33b92cd55d07e30bd0e
BLAKE2b-256 ba389c49aabda865a69a0f4579f2796e06c938d56d1d4f43c43febefc745ba9f

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 712585f248ab6feca9be2f0df59b78a168e8da38178d8542f7bc6e5c2a09dac3
MD5 517ce580a370fe3e5739bf3ca2d8db81
BLAKE2b-256 00d140e2367ee0e0ce6e383483cb0408f8c9359d1c75bfaaf10280fdc615d7d4

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6fe80b5b10f89723334c184f0a082a71b40fc1aab7c21b70b0a2d99da7f4819a
MD5 0f7a001c938993926aecb5d94171979d
BLAKE2b-256 4551bc69b89ca3837e1acc0878517cd7ed3102b6ac3e5c9b368f95f80ec37961

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 902fa93803a5ddf571cb8ac65d89201ace58ceaf99116a09a540065fa197f60a
MD5 a0bcd1160f33df1ccb3b6668b3d18f1a
BLAKE2b-256 04a7bc8a1b69c8a0df1eb7bb4bc4242c65d23eed039a982e476054199d7d026e

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e68615bc9a1e6c95d9e607ac79a20419c433f5f8e70082be7ab74215adfcbdd
MD5 c24783acf0734861e82eee00f552a857
BLAKE2b-256 a36e295ce0fe4e7a30b2ebd7911f51125c8709b6d43084671526f60228e78168

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d281620d4e6fdcbf8cb8597c515086305313f45ef8cfdf974610efbdbb94f1df
MD5 fd304db927af16efcca6791b9c5d5ace
BLAKE2b-256 8cba157bf6a159283b2fddf30fe8710601e2ca25e8cd25d4ea8b6753331c6756

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 513844fbd81864f6604eadaf2b2a67282d09a5d0920aaaf8afa8db397abd911d
MD5 efb2271d811558830bffa6066c1a88a2
BLAKE2b-256 b4f7b96c52c7b8de6c1fbb814c35d0eeb9b76259679c07c8767180bb70b37cab

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9e3ade0ecac475f2d1162403aa7d566995e16f86c1e4e1f86c54128f6012c1bf
MD5 423ace9e34376407706851deff4e2ad5
BLAKE2b-256 c1af6ddf302cd3c5449f6d299f634e481b5dce365ef30171437732433cee6098

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 797f7040ad767475cc9f5d6927ab9c90356890eafbce538a0b1fb76694808fae
MD5 41da963103604a5ad99e1fe8653d36f9
BLAKE2b-256 262171e563f4339d57547a62dff4126b83da11d9b8c64eab7a7b6d6b0dc85553

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e38b5ceae08e36fe40223f10958d18556929409afd35a98566bacdb9e228676a
MD5 839cb44e93ead47936da6840f341c7d6
BLAKE2b-256 7f085d03ffa17a8bd4435bd9863116e571ea13772bf19e34069c677a23ccbb6a

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 29754ffaf257062f77d19e1b45f289c66125f3a27bef0306605f7adee6c4ea09
MD5 9eb132d0a843383a9b1e59dd9ddf3c7c
BLAKE2b-256 44292992c5fdbf544be56cd42fbd4d605d33dbdf13979c0e4a1025e398cbcfde

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8ac67b565f0bea4b31541c816f9929409b887a2ad36e95eae200052dda19288b
MD5 a92e932758af58a79543acfa5fe970a6
BLAKE2b-256 bc3f849ee88a620009bfd6a4eb10c7e5cbe179d476e3d2e01f336a181b865a05

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e24b7b7845469363954247539df14f52f51e72f31569dffc2bc1502482881f6c
MD5 e9a92917e1ab7c7bef3951f33624915b
BLAKE2b-256 98ac92c9a6caaba923e9ff16ff5b2f5564a0e413169e70fb32ffa187e16873cf

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2025.4.8-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.4.8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a31521e1f8028b50899068873ca1e5402531eb69109b4fb1ee703112960af37
MD5 91834e22d06bd582827b94218de54223
BLAKE2b-256 4c9bb146dfa795213102e4c28310d9d40f7b3446d3f53bc715ccbbce168fc72d

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