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

Uploaded Source

Built Distributions

cyclonedds_nightly-2022.11.16-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.11.16-cp310-cp310-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.16-cp310-cp310-macosx_11_0_arm64.whl (790.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.16-cp310-cp310-macosx_10_9_x86_64.whl (857.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

cyclonedds_nightly-2022.11.16-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.11.16-cp39-cp39-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.16-cp39-cp39-macosx_11_0_arm64.whl (790.8 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.16-cp39-cp39-macosx_10_9_x86_64.whl (857.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

cyclonedds_nightly-2022.11.16-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.11.16-cp38-cp38-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.16-cp38-cp38-macosx_11_0_arm64.whl (790.8 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.16-cp38-cp38-macosx_10_9_x86_64.whl (857.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

cyclonedds_nightly-2022.11.16-cp37-cp37m-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.11.16-cp37-cp37m-musllinux_1_1_x86_64.whl (6.6 MB view details)

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

cyclonedds_nightly-2022.11.16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

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

cyclonedds_nightly-2022.11.16-cp37-cp37m-macosx_10_9_x86_64.whl (857.8 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.11.16.tar.gz
Algorithm Hash digest
SHA256 4cb1cfc28dc5c3e22a43cdab154fbc57e8e6fe1b736cce2218e599b1b2b9884d
MD5 0119cb7d5f38f45f8bbc314e440490d4
BLAKE2b-256 9309991b50b78dd1ef1f772b3e2688a46fc36423663198945c4500af5e2c0402

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ddf648d4ceb87a737ec3d9090feb127295d39c2fc6a883e6ae57eef6b6481cee
MD5 418af409539240142db7825ea0c70ed5
BLAKE2b-256 a8cbcebd23d0fb5d7c99dff90d63a3c17127da19075dc890861b4244044f0f7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 59e49980c8935e944ad2150c4864350d23ecf2d9e7ee30d9ab1ed429283d3ad9
MD5 c78e7f5598ec6ef214cb69a1433a8a04
BLAKE2b-256 832b3861ee5d96e3de5f48382fd2913c59de4fe96465c348c3dd3a0e5775587e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27bbf77aea7cd477b17ba3228691b7fad965e86ee965f732fb7075caabb90b54
MD5 7f428c81f14aeee6ef2afd5fb6b1ab6a
BLAKE2b-256 03cc4a7494f85863f70e223b4ac5d1f97d1e980a295c2f4b873927ae446c2b60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 590b2dc20bf8b605d0bc37187c893c76b6d0c097256ed60565ff4c204e290f3f
MD5 993ffc48eb5b8acb6e990c7f02744ad1
BLAKE2b-256 108e2ed8666bc1b6ee83bc98c44de42862a0ebd6f7e243fbbf31ca923dd01825

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 67da7b9ffcea83c388cecfed83f3e9ad7e3e5ffd7f2c5a0e9b16aff5fc5724df
MD5 9cd75c06a7c06beddd84d6fcf22d0ad0
BLAKE2b-256 0110b24dc704d18596f90803e4c0ea03fa888fec5fe4990e2e121eec04124e97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 56621b9b24189ce25bcb0eb4e87fcabb7791fc6a44210712c009c62ce7ddafb4
MD5 cb3f75ff50e78771c85f2584c33ff7ab
BLAKE2b-256 5c33314888f8767c601773f2913c2b79c97dc073e85a89587d5c25898f76b980

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8a844a7cf8a8936a55ca0e38ca1bedd44bd3560068ef49f459653e473b6c840b
MD5 3700944da0776504376608f2f3a1d0e7
BLAKE2b-256 f2f03dc10b873b05531c62504cf5ccf140bf22fd458bef08de0ec9bc11d06adf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07db90836bb250b1e6ba028ed3d871dde5900cc76a72d7eb02449eafa5550f3a
MD5 fd520c75d54b860f91d38d3e002f8cd0
BLAKE2b-256 6efd886312b814252d4c688cc28efd8849f1bb8b769ced1174d8980ad25c45e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eeffa893d0c421279f21308c5f2262910ea725cf20368c24af9a8f9db3cb00ab
MD5 466d118cd5c0737fde42a385820ce240
BLAKE2b-256 a2df4816d3c4eb84a62815d01ff35a83563fbc713846dcd0666ae1be18f16725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d84daac774a7d30357cb23da884b810e3f66a2581aeb8bd192e6894e7cd087c3
MD5 51489f73855ed66e108554709efe5847
BLAKE2b-256 468c536c285ada7bd42eecdf3ee5621d28c2c6d249cd24d64ec1ee0992c45299

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 eb7f50f5f993f64c2add8bf4d1e60fba8b0f994c14d81add8ebc956995b083b9
MD5 5df1e42fd8e1a930daf5431b9de87b28
BLAKE2b-256 c36ceb3b0a23d9fcb921dbd377dcdf62d07e1c8a6ab256f3714cdcda1af06386

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d567db27fe95ea799b9f2953d8bb7f3fd9828a4229b98e418dc95c2f8a10b525
MD5 7d83a3514718c8c1e625628d3cead1d4
BLAKE2b-256 9b014674ecdaeaacf86b6db6f54a335eb1e6fd0e6772ec8e4ef0c409a6cfa8d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1d7d88da6c59dc9ee48deea5618041dc06c48272ff3e4dec89568d0065d59da
MD5 c52e8d5c92508cac33e0e5c012d5b4d4
BLAKE2b-256 d6c2d74820b8ac0d837711c812c4c0a34d18ba29a6e059250a050ad77924fe84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6eb1a9389980d5003b19d025a114a5070dbdf128ece619db2297dd9479cf67a7
MD5 3ed868f18cf5131b5228949f1dbc8ab4
BLAKE2b-256 917a8c41585c5c136ba9c3c2869b7617a24802d9f36972739d86c3520141fa92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0eef64516538698ad652ef4e8fcd728f3f7e91ab105f5f15ffb41b901df102b0
MD5 52b02e0dd73a45f4a5861e7001c9133b
BLAKE2b-256 fee69d25ecf9af660c85409c321364c532d897a738ee1b8d1213335587ef9ee8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4f74a9307b248365a10079652192252b58b152cfb2b934cbeeebb1f3c2ca0d06
MD5 8f7bf1b66988a11f215293440bcf78fa
BLAKE2b-256 6c547e0703ed5a4e9761849cbeda806abe0c424bb9fce419a6b51c8fda75969d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3cd578e2c33fbdcd21b41761bf5caed1e2b7cff43b08985e2d82c00644482a52
MD5 3923367d8bb7e1d1eaa31b27b1265ba7
BLAKE2b-256 6632967569b86098415444cf42ddc50d7cb3299b861c076e2ee1df3f5c1fbf63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b8a28c35c4485fdbe95697ab59024e2268350b8e7b8302d6dcecffed2bf8e71
MD5 bc045a6af12639a2b3603f12fc870f57
BLAKE2b-256 5342e52534dfcfc040cd9319df9c1d03ccd6d5a04aca011857c1697e7e5d951e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.16-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 70865e0ebc79390486c1d057e5419422ab2c03724cf80c1bad40f75fc249b7f9
MD5 d4081a3e4af93d646a7cd6775a1b1f3c
BLAKE2b-256 e9ac7749738ee58988b5a3055bd5827dc72eee749a10d9ba131036feb5bf284d

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