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.1.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.1.8-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2025.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.1.8-cp310-cp310-macosx_11_0_arm64.whl (832.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2025.1.8-cp310-cp310-macosx_10_9_x86_64.whl (902.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2025.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.1.8-cp39-cp39-macosx_11_0_arm64.whl (832.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2025.1.8-cp39-cp39-macosx_10_9_x86_64.whl (902.9 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2025.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.1.8-cp38-cp38-macosx_11_0_arm64.whl (832.0 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2025.1.8-cp38-cp38-macosx_10_9_x86_64.whl (902.9 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2025.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2025.1.8-cp37-cp37m-macosx_10_9_x86_64.whl (902.8 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cyclonedds-nightly-2025.1.8.tar.gz
Algorithm Hash digest
SHA256 ba85bcebc320381ef7110be4500421503790bc9b2001ffdd1851a3b1e8b87b2a
MD5 1612a830c33e1b6da1d59981c9343000
BLAKE2b-256 ae87e3f9098c978c7757bcd24d2263f8401d23c77d9ab282b8db20ad22eacb1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 936598589afca42b25b310c100f5f2bfce3a4ad00bd9892e7b113298ef9d1755
MD5 44e161a802f9e9f453857444980de382
BLAKE2b-256 9e8ac93549303bba8b71edfac1f457e8f18418ad30313d96048e8f134007ef0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 574132101041611b5275a83af94c90ee68a48838536d4fac23ff32b947ae8097
MD5 2f92a5f0f8c998d95e1afc766e31e62a
BLAKE2b-256 e28da80f2cbd8989c2809cdea06874d1829939cf95e2d1e44d0110435b1832a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4a3195af24601fc2317218fd697508311ebbf5d62b9c2b2fbbd54199df7fe9c
MD5 475e52433734a6fa1c6d79e979f01fe0
BLAKE2b-256 eb2678ca145ca9081204b1cf6794a600270c5debf5ecad358aa0ee34c6ecbf3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f12f5873a5c65993bf0dbdebb8b68f0e3f6081fcdd5f9f7d3f28f0815c4c5569
MD5 9379e02158b1eb7c97d9781dbbf58979
BLAKE2b-256 09fa3417fca5b17698492b80c2566b47e3fe2fefe38c1210c2aab5269c86f137

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fbe838d1e8f3d2088ec0b296ed53a9006593d1cf2eb7d0d709e4e166cea20a3f
MD5 64ef224166d6b1df1018ea3b62064aeb
BLAKE2b-256 5888ecb1276c1645165ea5ddf1c9414e805904fe2f31e8f4bea96b231ebfe49a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f6399cd59a764dcf366695151a4e87db6ab52626bb9fb75899a5399cbf0e8b5
MD5 c512e9a11b2dd92996f30b849bd79c07
BLAKE2b-256 504080d9aab67716931d018982df65fca8a755648b528650d690ae6e9f5e7bde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c200f370829719bf229b231ada314fdb46e4e669320ee863b93e25f3f6062fd2
MD5 b57b101fc209927ae30619f5c66d0903
BLAKE2b-256 aa11b801a32e0f05077c4fd8952d715a0d3ecad6052312456b765ec0f079a2ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ecf45e44159feff2304ea81102c6e3677daeba6051e3903d6854a095bf8a0165
MD5 e0e8c579d624fa2e127ef68440068f27
BLAKE2b-256 205b1b5f69d583225d86c77406244a22320fe79e6c34aedc60a60dcca862821d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4369f6fc09bda3b81c27a9415fdc50b673783998bc6eeb315aeef5c1ed3606d8
MD5 ddfb5c85bf8b2242ef24bc6a687e65fe
BLAKE2b-256 df20345d47b22e1853d0457bd3618cfc074c934d8873de4c4fbff9b5307749e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b00f45858bcca4e72e5b5938378c0503af69a834df284bc09dd8fb2f90a52157
MD5 ae12a781ebf7861f0c7ea46011e6224a
BLAKE2b-256 4c081127afa39ba493c03c2a52b9ea7f813c61c29ca33f1ee02edf6c2cba8d9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 109392c1b66e13b91c9bc95ec919b23e7639410162f1db9beea33f62ddbea993
MD5 9d0b301e046570b9b891b1e2369dbc1a
BLAKE2b-256 faa6050d33d55c1107b7220201f6de6def2ad35cdde6e51fe7c796f6e9e061cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8f2680a6789137561b10964d3720665162c212a1e35c0f61f9289e6df92bd846
MD5 28f7da1a31899a3ece713f8a2cc020c2
BLAKE2b-256 ea66a1c0f551172e3ca24522fa416c647a485c88bd7e8381aa0c4925f83b35e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c117d0ecdd9821e982fa3eba49b1a642ee856ac308e52215b08b69c7607429e8
MD5 59f93a0fbbf8dd0a5348754e5cecb4a3
BLAKE2b-256 3c971c669b09a78980af3bfea3fc738f8c811c0cca8055b9cf178a18905f1a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f207331b87ce8312aa7af70d50ef638a8434ba6064e9c3ed0e55fb50f1bdd8cd
MD5 295bbcb35dd6c33b05a8226a11089a5a
BLAKE2b-256 7782e1ac47d743873787338a7aa4ffa70d078522eb7086bd2e84b4c0b571cecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2025.1.8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6cb0ce9ad3e202af9d54d4dd3bb90266a21e3452a62472d411455a2132f28a40
MD5 41d461db536b7c30e276673ae27fc0af
BLAKE2b-256 3e0644f0277108d4384c9a771243538e82d2ef3be5347d8f04621b12d523955c

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