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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.7.16-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.16-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.16-cp310-cp310-macosx_11_0_arm64.whl (846.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.16-cp310-cp310-macosx_10_9_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.7.16-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.16-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.16-cp39-cp39-macosx_11_0_arm64.whl (846.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.16-cp39-cp39-macosx_10_9_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.7.16-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.16-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.16-cp38-cp38-macosx_11_0_arm64.whl (846.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.7.16-cp38-cp38-macosx_10_9_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.7.16-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.16-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.16-cp37-cp37m-macosx_10_9_x86_64.whl (924.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2024.7.16.tar.gz
Algorithm Hash digest
SHA256 fbf34ed01e67c0fada678c97f94d87b7c4d1593f2454c06bd8dc427b7ec767ed
MD5 956aa3a334b9900104a5573269d3abdb
BLAKE2b-256 c820019d8a0a91cddefb5eab8b5c0bb7b8bf3df7a4bfe4237a30381041ca5502

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5d56409f55f8aeaaf056ae61d8089b5de7fa758edb590bde5a506e29c60b6b36
MD5 d8f6f0e76cd1f8e3adf57fad86949ff1
BLAKE2b-256 6c27f3c9cdce8808dd52a6eb265043396ca3e0ff6425051afc28652c52855067

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a48af1af8ae0ee9e7b8570e3518bf1fb5f730e23dd7302a0b3e40b59d139c9a6
MD5 977a0c3ad862ee10cda4434c1f0b919e
BLAKE2b-256 3bb9d77ad85a2a2912701890807442ae4bc2a25c07483f8948f6e1da957e2231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18cdbb495ff4364046d228fef671a91e933b6f9981396320e387242464e35ab4
MD5 32c230c5e82fd261850e0c20eb37a402
BLAKE2b-256 5674d046fca767a23b8cf11e358839037606db400578ad705a81b0e5943ad56e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb71ecbcada78190969bf62230f3c1a086374d6fad0bca5b2aa2fbd06cf252be
MD5 da8bd2e85c4325acd01af9fa0ad29d9a
BLAKE2b-256 5f15ba4350ca76ead80644b3e8f410a481018e87425fe76e5b921aac587599c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 84f86b052782a741102f426850c50e14bd9a43dc3a9269d31ccf8a1de96aa10c
MD5 965eed3f0540bada65831c0fa6536780
BLAKE2b-256 5c6e43cd70ae965d982894b63312b2c285b57c45a3a3f4c4476d6fd17e368453

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6b86df1e1ea1ddc326c30637b4e4002012f29f2ff9cd74137741b5939b633375
MD5 c3178b800546b53a2a9bfb228c0c12d6
BLAKE2b-256 fba4f5bee198b89bc90a25eea6a0250da9054040590188cf926a1e2d912ba802

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 04363ac7df1a7e0356daf74570a236f2a03c7a3f47fb426d3b78143e1414b744
MD5 b40cd0e4a1e0ab637c36e12a3615319b
BLAKE2b-256 cf0e9966392ee7610ce9bd3b8215fba26c2f9fe5875accfa9998a144bd431ff9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef8a2691ccde5f35c8377b761f218c42cd6d2367728add2b9faf4a778cd96c8d
MD5 4ff5bf4a1b3e42b9e96d1d10d3d66536
BLAKE2b-256 4802c4e3f6f152241db2d6a3161169848d679175adb3322b36b15ec007816ef4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 09f82c06519db19a4ec3f769dc5c3454e5789383a463eaf765a5415bcb1da4c7
MD5 2051311682b94d57a48b8015f82962f6
BLAKE2b-256 da82fcc4f24ac42dc9f63f8bd680f72526c93fc7393a2dc5132274993f33cf93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 27b4e0ff7552498c59d6789e71a5cf33da74b23350bb555d39cd68f90fafcdab
MD5 0f986dec2fdea799c6d06e2739ae857f
BLAKE2b-256 3199d6c6eeb116ee0803b73e35a46c2cb6d2ddb1131aa0fcfbbc1305f7d7ab72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6da1c86730f354dfb0c55e4781d2bae3c918b0d1b615b54603c93f7c73fa1c26
MD5 307e9a31cebb0f6d0f0bfa2b1216091c
BLAKE2b-256 38c2858aa147a1d89b0a781e3c706e052e000e7badb5121e6cd5bf4290ee877c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a4d8f9c4f196ab4c004f83ab27da4a600c0bd437d72fa99ecaed4aaeb7429f1e
MD5 87c2e72e0c86df22c51af72af40a7f38
BLAKE2b-256 d824ca55c9d3d67398b82947daaf21b5269f63b4ccb369bed5aa44ffad9fba7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9977ff3599ab66236842eabba697ea69c6e2abfb6cd78b0a3c1be819e7195fe0
MD5 b19b7f5e94a96f3797f2b749d0372ad9
BLAKE2b-256 3812086e0c496c25030d6efe46d5ecbca72405cc45629392bda6350d961d1b3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38d656df214f82c9234e89a2f3ef3f742ef6fb898cb92f453fbdd5656275ad18
MD5 83b7015141c0a72544b50e058503c5e7
BLAKE2b-256 fa42f428374ae5cf8d85558e2a244430252d6d41a61643aca34109ee91cb4097

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4aa47c280af18d820773ef8c03b38444cceb32ed47954c78eb934824d22688c0
MD5 3cb89ce7d644880df7a59abac018c5a8
BLAKE2b-256 4377c8caaaf5f5048d50453a147c47111c24f557a24e3e9feb408adc0ca335b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1aaf2653a7b4432233cade75638887cfe9fffdc8349deac19eb5ab8c85da41f7
MD5 d9af4acf9baf1399312c2db8c0f9cd53
BLAKE2b-256 5e10b1bb0973c26cdbeef595b8714903850c739cbdc9eba1eda6501572390e0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 739e713c3ca2bf8ea6a3d548ef37229910abfc17f071d439de36346e41189669
MD5 3715b8e36a6cfb0f7e4976a6b2428b17
BLAKE2b-256 5ab074771bc4e4bacb6ff397b7213bab16f4dc0f3b4ce60ce3a68c9ae5a83069

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee47e014c0de2b058acfa7d3dfd5ddf85a2750a7946215415c3bca672cb93782
MD5 1b152edcde582d08c13a14281edf1e59
BLAKE2b-256 83d0d4034052578b85edc1377989ca0e13a8aaa14165545992545f8e91f44dc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.7.16-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ffdbb305fdb171f545ae7060dc69ab08d60fb79c2e5a17bd1d62c3c89531fc57
MD5 dfd2243a42b4a1c71eb640c450c6f673
BLAKE2b-256 360101aab1d75744591d86a971b66581a5ce83cc95e9d20375f9e69cdbc50530

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