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.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.7.29-cp310-cp310-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.7.29-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.7.29-cp310-cp310-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.29-cp310-cp310-macosx_10_9_x86_64.whl (866.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.7.29-cp39-cp39-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.7.29-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.7.29-cp39-cp39-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.29-cp39-cp39-macosx_10_9_x86_64.whl (866.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.7.29-cp38-cp38-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.7.29-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.7.29-cp38-cp38-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.29-cp38-cp38-macosx_10_9_x86_64.whl (866.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.7.29-cp37-cp37m-musllinux_1_1_x86_64.whl (6.5 MB view details)

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

cyclonedds_nightly-2022.7.29-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

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

cyclonedds_nightly-2022.7.29-cp37-cp37m-macosx_10_9_x86_64.whl (866.6 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.7.29.tar.gz
Algorithm Hash digest
SHA256 938263dc5f0182620dd21471b4e3c1564719cb2b3ec2e6f6f5fb9f85cdff2d19
MD5 b0aa9b73b96c39ed8ade48bd023f27af
BLAKE2b-256 f4f33d321d38a5569c5072ea70fbb2867ced1665a7835f62dcd51615dceac9eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0b1500d4caba6ead143ec6514b6350fa20b5404d7435f76e7ad3bcee23b91ae7
MD5 7c2dc1261183b193cf283424fb4efd5b
BLAKE2b-256 822b42f70d140bff1052e8ab46dafa8cdf9b50846e4006ecf4eb62182195c628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 cb914c3ff85d8fbef24282480f1453f342432e93156d87b00540bc8830d85c41
MD5 9a7c742644025fc3fba850caf31b7b5d
BLAKE2b-256 63e2114e8885f1a25809ff04123e93dbd8062e787b7f0e8dc49a5a5ec8c212cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c86a6252c3bc1743c8ea101b9f2143c7b2e229d03b1b87f37ba78d70a9b2eb4
MD5 9d25e4e1a7bc8fffce849b3b6b240e36
BLAKE2b-256 d5ba224d42a3616cc72063f5775322b9d15b9e920714fe906aa2d97952670d00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d9aba74ef0f2eacfcfe22df40e59b439c09d04ebed04e774f499559e6a3eff5
MD5 394687411e9f3429d81694cafa49966d
BLAKE2b-256 92e64007af999a405f3de58bb25a8d0c6e4984d81240db9b765ae6ca8c0b0280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 effd2a25e1592d6478c46b22686c30115dd0258324757862b5047ce24bd3a0ba
MD5 a086ae8cb35faafb70d9b689a933de3e
BLAKE2b-256 46754265c41b5ea7c935cbc25d2e49fdda55c7291893b0a7d7d986d147dffbe0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6533dcb4129fb0bd85c672f41cf7f51b8ff9b54f0490ff94f18fc07a230d4956
MD5 0f44bb635ce289ac50c19fcd2c2ef813
BLAKE2b-256 fca9b5e135b7db178b98123958de4557c1e5ae95e48d0e312787f2d8abf5ca4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 75917b84a9c6945e9def6102dccd61f167ce4b27337979a6cdb6a23d168a215f
MD5 d8cf8b5045423739bd149966d6792051
BLAKE2b-256 7f559dd07b48a81ff12c1724471410ad16a4a2a0efc69bc0e3c668c082f1d3d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 80d52b885412a882ac6b9ef1da5513541f9a3dc79c612333e34aefc019bed04f
MD5 67c77b3aa668fa1b0dc358315fbeb2aa
BLAKE2b-256 512e9552e46dbe029db94d9b215f8967ed5bf1663acae392727d6af7d209bc4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed457ea5addfe0adb00843393ec54ec4fa38a98a220849a109ada05477b3e3b3
MD5 f85de2d9dee3e43263040608b68c3672
BLAKE2b-256 7f46a22733cd412ec52632a5536f8d0eadc457124b929fe980d4e0eb41dea432

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8ef915e22a0bc19bae63be9fb0eb231cea5a07ee9a19882a09f076a53f887dcc
MD5 76c4f6a17a45b8020d87bc64670cf76b
BLAKE2b-256 6979f5871000b0ee52d77b072f8565fc5bc156afaf9f26091b03fbb77ef82ef0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 25de4c58f9d7c25508dfa7c0f463bd8f45651d7747820c1279157d7b44ccf1e2
MD5 534a3a873176a563fc6f85c902b00c6c
BLAKE2b-256 278171e3b91d2bc6ead09bc88fe81cc2961965431535ca0e0cb8695eda97e95e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 066ba9f4471b68eaa759ba2705e4eb6515a04a0a9452865f18af1ae45e556dc4
MD5 24bf0cbd099d4f9d30f3999439b335c7
BLAKE2b-256 2b2f44872cca7f0af02cfbbb39a89437ff35cdac8d31245c274489efdeec12a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 451500f1131ed5e99556a544a87fdb23f242dc55781d81f95a401a9c6eed051b
MD5 646cc51da7b6427b7242f54fff8e4c71
BLAKE2b-256 747d054fad376637c597f75aa05ffdd12088186801013970ec6bf0cf3aa0a83a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c61997bd23f70d2da43e64bd893ee1f145bb97969510f2e2f5921775ddc62346
MD5 a7e6f79bf9f5a962f3f1aa58f67c0a6d
BLAKE2b-256 0269be5c2b39b8e5e9b3d7d4e1f7ee62bd17f00fc24807422fe09c257c82218a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4eb6030d88a060beb94f578dadad2dc27c4167c8ec9d082ece0aa0e6258e9f04
MD5 95c0e8eda7e9f0fd25f55982aad2c59b
BLAKE2b-256 0f670a355ff0680b20d8e7224f2130db03bfa0e1040ee6d95aa1abfa4bf62239

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 01f2f39d223af7c4e792d55736b973c84cde7a8b3cd74fb715525d849f01169d
MD5 e8c8d6a77b0d758f967b9e552f210e18
BLAKE2b-256 89ced48f85b874fdadcf1e0617a154df71fb08ccecee3c9b4a2dcecd91ecbea7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 00916129284237a27155f4ca966682724a860047ee7ee72d36a62b7b3bedda6a
MD5 80b2054ac11893de00c047ea329bb9d9
BLAKE2b-256 40aaccca6cad734db1846cd9ec4150ceacb6ecc6e64ec2a694395b1add090ab5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c691d9a66095cd0f1e87863ded3d37178ccf43f3aeaddb7e6f7984272015614
MD5 1c6002c28da28b20acb99769b616bcfb
BLAKE2b-256 448d52053a424e51ac49c7d182dfe6bddf14fcd8c5b0caf1380270621c7f3b1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.29-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 11657190346a4027eaf6698a4d1dafb7ac7ba86e5586b9ff0904b0faf547f414
MD5 d9113f8aee735a3bd3ecf2ce2163c962
BLAKE2b-256 94af481bafaadc24d6030346e69510f2a129137ce6e08739aa9c2007e18c37b2

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