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-2024.7.24.tar.gz (161.5 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.7.24-cp310-cp310-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.7.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.7.24-cp310-cp310-macosx_11_0_arm64.whl (845.1 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.24-cp310-cp310-macosx_10_9_x86_64.whl (922.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.7.24-cp39-cp39-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.7.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.7.24-cp39-cp39-macosx_11_0_arm64.whl (845.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.24-cp39-cp39-macosx_10_9_x86_64.whl (922.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.7.24-cp38-cp38-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.7.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.7.24-cp38-cp38-macosx_11_0_arm64.whl (845.0 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.24-cp38-cp38-macosx_10_9_x86_64.whl (922.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.7.24-cp37-cp37m-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.7.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.7.24-cp37-cp37m-macosx_10_9_x86_64.whl (922.6 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2024.7.24.tar.gz
Algorithm Hash digest
SHA256 2d57f810885f33ab2a3be70b8c38203b9357389b135add36bc52465584ef00e9
MD5 a6e9066d2ebecd8c271cbaafe47adb15
BLAKE2b-256 e49179a916ef400c87bff1ecaf4f106110d5af5d8286ae97df48ed8df473bf8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2054f28e122d5601947c50ba078f14f0ca409160c38ec2752b2c96f8e91fda17
MD5 8ef4ddc905e71b1711087f5c7384c7b9
BLAKE2b-256 b25a9915f2acbe38fede2a009775b4277201600c12106de63e5dca8eb65c6cea

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2024.7.24-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7812a4c56fe5a8f1da55cf7657f3bd51dcf81d3908147ee736350d97c8fdb990
MD5 6a27431c6fdbb30b622ce5102889ac1f
BLAKE2b-256 3ef3101d302c1834a887a295f3cba556bab5c576ba2186ebc132fc3bf1979b9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47fe97f102b09f250478f98b2a3dd09dac688cd97e03516c48f3971284d36fa8
MD5 0fa4602014572dc26c87211cff7ae4f4
BLAKE2b-256 27fb93908769e0839b4aa807bca203c362471f43d03138671a96df990e87b1ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8aeafe84aaeee640b31599c7181437ead25fead937050655e6526754df9a245d
MD5 da7f135a8c5319d958f03f8bca34bafd
BLAKE2b-256 d7dc6ee98f44d35626f185b03f34fbaab521840e76abf4464ef4c439dfb34ba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 764eb10102b3276d62d560891dd043d101fc76f19f4de6943a61d433ab1d927d
MD5 4bcac8fc3d13bb18a0c9a292dc5608aa
BLAKE2b-256 e2716dd59680540db472854595e8dc1f1e0021d19a8c00c80a373ca6bfaf473b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf60f6aa8b9cda0cef970271180442a07ed5b4a3bc105708675f3f6a57aafc0e
MD5 d81c711f24ec79a344208af2110369e7
BLAKE2b-256 b8fd22ee262461e30343e612775a31a5d18c351dba8b66727007ae544780bb34

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2024.7.24-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 24cde6a4cbe38ee989954e190c40b828a15b814806fa3b15c7ba40a5162597ef
MD5 c0e30d2875069722becb2c48600e524f
BLAKE2b-256 95c3e9a46f00ca12eae7f00fe16d9582680d4ed80c4c1bb705d44cdcb7a8bc43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 105a42afdf0aeffba66f1112a187fb24d4493cdd746ad09af7430fe770be9b22
MD5 5ea599cad13323010e066905188d086f
BLAKE2b-256 ded68c2f523732cdf7f5c662002efde3ba24ab75ac2a015a7cd6fc9828292bc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7cb59eefd06153238cf81848c784c6f964e5ec94560f888f524d4122f5c33c68
MD5 523db31fc732bafc64e620bd5d9a17f5
BLAKE2b-256 7df97991feeb60f0095a45c8b0d6c3665220c9a1b188cad687cbcc98a8a96928

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 18df532f597462ed14bb8d912046c62a89fba0dc4d773a31121ebf50128c9b78
MD5 12ed0aa3123ac9aedf9174387c7fed48
BLAKE2b-256 b6f9b7c1f661ccf95b31b47e3dec731adcbbf298fe0776ad424e117e8ed86c81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1db6ebf891acec0ca911f70ff7240cf3facd791587422c0196e5d71ef4c03993
MD5 d61be6d01c9c90bd2eca5852c7a27193
BLAKE2b-256 c09471bf64f6f956b6ff92df594cbb86622bce85e2a56b2fbe4cf8af2550863c

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2024.7.24-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a103d6d232a72d3e91970403de37b057d4ae7b8f13ffda1972a171ebe288dc57
MD5 a20d3a28f8ef5da59bb6a6e8d3a39ea9
BLAKE2b-256 df29179b42c945b597c61b8c0b590128f92f8e04c7178497c08c534549277065

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7ba131544288f92060bcb38b0086d5a9687402707789d9163aa8c0ecdb746f17
MD5 2743ecb7a1e45bb174ae5d693d092bf7
BLAKE2b-256 40581eb3a0d3cdbc202b8987a47d32ad3e1387b208f142acd91c0adec0114939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2610668ea8fdf0f8e4d40ddbf27541f143625304fecbe85a20802c975f0eaa60
MD5 b64de73688840eda46e79a221da362f2
BLAKE2b-256 c7c8fe160ccf3e54bf64d8d07eb585ee3d142e3d18a764ca42d0341bcbcc58b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5a50df97fe8919b23d7f523d7573968488dad537fa03580bf974537666528512
MD5 559429b07a26f0256f85310a24aeb653
BLAKE2b-256 e60fa4baae42efec0164f372a02eb7d6078d291a04fb67c63fe61f25504a1036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b37f0fa11b287480fb68d738d9e9ab65b96b0f072b2d6ee19eaa37a01303b954
MD5 eba85bc6575638886ac3f6bbd3c9cb2f
BLAKE2b-256 3ea7112ee9041c514db4dd0b01fb6709f590228161da500001687a2165172aa2

See more details on using hashes here.

File details

Details for the file cyclonedds_nightly-2024.7.24-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e961ea0e402e7649dfd187d5014a399033b45b2de56939ce7b6caa06312f84ee
MD5 7374b67a0b9494542be548f8e50a44f8
BLAKE2b-256 7175b4551d4c0a273236c7246bef77dceaeb3e2e74c333bb3930252b4d93b301

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 475d4da1fd4bb61ee6982494c6b0c8c615b49c95e4f4a26c1e174c0a3085a618
MD5 34f9177b07735e5574c1e94cf56391d7
BLAKE2b-256 0943140ea196d9cf2d672650a2fa65d04b8ec346ec5b9c9f6050e4592ea912e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.24-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 36c234c5db954c7bf934afeb310a695529a26291f419b865964ef56720b4928e
MD5 9df92285e2702d3a8b74c63efdf3c251
BLAKE2b-256 3ee14c4b07f0a229a05e3136d9d7fb1483a88ac9f38dd1d9bef7858cd2715eee

See more details on using hashes here.

Supported by

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