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

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 performance

cyclonedds performance --help

The cyclonedds subcommand is a nicer frontend to ddsperf with four modes: publish, subscribe, ping and pong. The below performance run example is the 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.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.8.24-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.8.24-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.8.24-cp310-cp310-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.24-cp310-cp310-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.8.24-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.8.24-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.8.24-cp39-cp39-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.24-cp39-cp39-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.8.24-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.8.24-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.8.24-cp38-cp38-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.24-cp38-cp38-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.8.24-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.8.24-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.8.24-cp37-cp37m-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.8.24.tar.gz
Algorithm Hash digest
SHA256 594153c157886fd3e3dc96e03b1ed8995d6b645c9951c4e315d73fb4e8aa15c1
MD5 f1e74974ef2a47ec8320537ea3e3b33b
BLAKE2b-256 2f43d7052a08254a61c09f2b0f91c69365d2e24517a5a084df4ecbe87cc79e23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 894f68c5e05de2c64c7f3b6c5d56295da05375b5ad2ad77908b46b8e3ad131cc
MD5 7e2bbe64ec847c6f5d3bbdfbf0d303b7
BLAKE2b-256 084859812a2f7f21084c62becfe5d178be604111360e12509615a28824d44efe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3bfbe01529f016a7414cba814f3fc392bfbc8706eae7e6697b307b44cb34fed9
MD5 f674fe99eaafa2406f3613cb28dd5d58
BLAKE2b-256 4436fa4889fe5ed57d34ec96b32442803ad8866b1a44eab98fd1304523cc1b5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5faf66e40757e8da1d6d4767abd928cf38b0e53592ba3320c2cb1fa21af8ae83
MD5 d2083f64a10ef4abbb57ef1a35d6d907
BLAKE2b-256 08daf1a79f53b7e48fab12d30bcd3335b713b0d6f1099253d427625876bbb784

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7d5d543cc231b7da099181cdf7af14e679e9dbc60f725d82019d66be000d544
MD5 305258109b54225aaa16dc3a46eb5037
BLAKE2b-256 8c6fd02342444fcd80bf3a6d07dae2f5acf9b113ae3a3224e30144dc32b12852

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cca3a275a75bf3e859dcd64009504606097c8c317792fe7910fdb4daabd3e27a
MD5 c1f685168a0bd9585bce4a16e53b711a
BLAKE2b-256 ac62158bfb8a06a27ff6c84abbf5720f45d13992859e185701cab39963a72d30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb853e124e07cacfbe7dd432428d519ce212f5627aa91008630d15203a23574a
MD5 78ae252cdc44c03b60167e25546554bb
BLAKE2b-256 0a1a8669a884d818895890764434a2869913fcbf3987860764c29a0814831bb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 369df742e3d1520f5326e3dcc30b0a71706fba4df6c649392f63aabcf61f1c71
MD5 a61f0699de887a65529c8802ad7a0761
BLAKE2b-256 e5da4a01cd4d43adce71010408da1f7d08a12897f58cdf6667d24288fe40d372

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a7ccf5dfa1cf0c7eebb8c32b3cdf8909b93e0602eac44cb016b6e6d9a01a9d7
MD5 af681d04221e13ccd0e6e602d3370ec9
BLAKE2b-256 4ed4414e7ec180f34132d0fefc0b7a43e455daa390ea709be5fdd53407e6af36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6fb9f929787359f1b6520b36f1ef175654ce24a3b772fa2854150a4edfe947c8
MD5 e1e49e18470ef1992ab69016a23890f0
BLAKE2b-256 a8b018c88149e0c5411f4715b0d7fe457208afdd5f768e1b209a8cd890c7cae2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a43936dae5b01f3ae72714be0a343488581f9a25c07c7490c79a91c319a80d2
MD5 fbfb68cb6eddd77617b848e3e30f2fd3
BLAKE2b-256 1eaea6da9adf13360c871063f99f699d3ffd59c2294663d858b779a492f4a68c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f897be0eb2446a4439c95e0d81bb0ea5f027a1c0e5a5062cf0f5e13680582a80
MD5 38432d9e939213fe860e39854563b7e5
BLAKE2b-256 6c7e99c59d82d068741d95a5030cdc65d16fa5e3159dcf7f4e5c7373be61c2a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ee13b16c6179e952e3320cb0be334d6fc5cdbf9cbe3376edfc42f4ed522c54ec
MD5 cd947628a67e4ce00a703d4b219b7abb
BLAKE2b-256 de64b14ff2eeebd8e3a2c92de0385b91463689312434372022fa8144c7ddd788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07915c54a2f9ad600067e815fe4ce864c4a0e44059ba8216c0281c5eb4fe11a8
MD5 ff44a5d5b85b3b547dce0fa5486cd9de
BLAKE2b-256 f9085d3a1ca298a71bfdf885739976bf8c902f1b56616895f89e97d38c11fa8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64f3bed9cb63ffa1a1e4118b62dfb264e7d988ad4263f698b5c753cec6961b29
MD5 70ddd792757f337b524b7dd50ac0ea65
BLAKE2b-256 0321d8150d63e3473bff243e396efd3a83f2ce1fa5b7cdca5b2e28896a94b2cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 023dc9cd7baa71c982aa45ffa75d21684951c47dd4942feaa2d8392b48c5a863
MD5 ff6f1ac1a0944b80d5696bc0a40ba684
BLAKE2b-256 e6670d50f06dd6e5fbea09bd17e8b039fe60f0201e79fbffa476d5a7003627d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b4a798ebda0b69bb6e79c1f23fa972c6d70ce3a6c7a2b620a76ed75e3525e2b0
MD5 c21b956e7b202503ee5986b9d7cb6c7a
BLAKE2b-256 744295796a927cb0df9e26b66ca5d7d7ec70fbb6aa8da9d412c370224d47a1ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c27a013c3fa623d1df77a06398f165e74ec98d50acb2c4d1bdf17c1f444b1a56
MD5 e209eb924014f26202668aeb541363db
BLAKE2b-256 f874f2130188459131e3e2a661d7bf2ffc6200d9b0335c73b7a23ed0437e525d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25cae13a2023af2077420f788c0400fdcecdc3000022ad041a8fc68cacce18bd
MD5 a11ddab4d8547f94220083b492360060
BLAKE2b-256 9acadc4710048d0f511e9c62189f87977e1d3216e46b9a5059604156d187d76f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.24-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a01cf1b45b87b8935fad051ed24f9654bc0ab6fc7418f03900b3d5d474329a5b
MD5 ae2c039fff9170f16896c85315d9c8ee
BLAKE2b-256 136fae9b1a5225c7ce5430ad8577c8d915e9d1a1418ade036ee017045a107218

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