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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.7.28-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.28-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.28-cp310-cp310-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.28-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.28-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.7.28-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.28-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.28-cp39-cp39-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.28-cp39-cp39-macosx_10_9_x86_64.whl (866.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.7.28-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.28-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.28-cp38-cp38-macosx_11_0_arm64.whl (801.0 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.7.28-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.28-cp37-cp37m-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.7.28-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.28-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.28-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.28.tar.gz.

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.7.28.tar.gz
Algorithm Hash digest
SHA256 3f858bfc6f41e54f7a33330bf6f9ab4448925cd512cdc82c95b0f13c26f75675
MD5 0406ede962b72cf95fedc66558b4b695
BLAKE2b-256 df3cd6549dda71105dc4e810a17339397137dfd299da47650158c6ae9fa5b596

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6af48b057a1aba3a58d84b48812c50d4d011d4a2153a9619e67103a3c0e41752
MD5 580d433518ce591884bee8bf80112220
BLAKE2b-256 55840267c2c8f450ce4a0267535a44163f4c5261e7fbeb03644f0616005f5b0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 09af4d21ddd589247898c72238a35341949fdd25fbd470c79b8a13b8c5442fc8
MD5 dbbde4fb1f844a705714b82d2392faf8
BLAKE2b-256 da76014973bd04e9b35174783da13c60bdc9d91c1b8037939431687f9abbf0d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4ecd2042d9693e0046ab5debbde8aab51e1a387242060516fa69091673d4141
MD5 007da0fd713a904682eaec0edefaba39
BLAKE2b-256 300625ef814edc969d3812513b0e6bde36d3794735af9f4597748674f3b40c18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0cbdee3f7848635747e5a7ddef80e7124f23269304c1e91197178926942a059
MD5 58921a625c78c09032d46c807f91f0a6
BLAKE2b-256 cca12a5d3575047c0efeac62cb3e1b9b14ef5b89972f2d81ebdec41952f9767a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 467e06799fe41172377e6e7814b9a2b37c435b13eb6a4fe9072f6a9ebc638c5a
MD5 57448ab521a27378422607b6e2f5c389
BLAKE2b-256 b84895783b169d9d8707a916e37830711006f1496d5b8574ae224ea8d0b0e1b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e4126e41d79759ac081c80232c02e12396a04861408f882e43cfd00a3e691857
MD5 94e72b56f546768f321f2d7f28f97577
BLAKE2b-256 c3c133a84f1f90cf1b5705ebffa25c2c6745dbaf4b6098bd29b7779a0e1d36af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6f533c0e75b3f259908e85ac89f56c45e795d9256f0829fbab8d3efd44450e40
MD5 d9dbe502f772e7a3f504ec47c9a3f003
BLAKE2b-256 f4c3b297f2da6f84ba0e66c4415513448caf565708684c9dcf8bd7062cb70c95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2cd0b892436cc00596e9501d9ed27a865592e6f3c1e7c687e9e8cc0c29ee302
MD5 84b6370fdb5acd5b79c49a4884e69b18
BLAKE2b-256 e17cbbfea7b7dd402f476e1e9c27d42b43876f3399e03da27c89e05e0ccff2d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa8b41d0a88359504a5e65cb9b6e558ac194a69214d32c84e16595882e8266b7
MD5 affdd4b19f5e81a4756115749e06006d
BLAKE2b-256 413d24172f177c036caa04cdbc573c0364d9504c3eae0e9c61d4dae841f8b076

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bc65a1d445714c6df25755e992a2382d2e5366385f3ad4904ddc8ce1e8e4eb3c
MD5 2140621754ac9a2c99230b5d36d3a220
BLAKE2b-256 483e42002608aa8df511b3e8e82db4670e1e817758c75833a83212322619924b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 01567f6e70ea534b6f53444b1b8a41ea765127a0f27702b1bb1b1aee8886e1c6
MD5 adb3769b74004937f2240793a1503af1
BLAKE2b-256 5b4a2503be1dfc45e7b978fec5b3487eddb20df050840e758cc4b6c44a378568

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 41ecd8f4f17b861a36f037139bb455590e9365ec11b5c43b18beb39f46a6a325
MD5 24096d9a4d998fdfeba12fe41aef076b
BLAKE2b-256 20b1432f424a3c1cd642f7eddad4eecc79f55aa708b4ba3e746a9c067e3de21a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f38cf7e9598d570def7d73627394046eeb16123b007937a856fb5bf841b5513b
MD5 0d8bcc30800a800d118caa67e8d3bc22
BLAKE2b-256 e865f6904377b80f1a9583659f43c53c46326dea3e67dc8ff7970a30214edee4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c881e9333a2532e4f4fae40b23b61dfd5a6273d5be43892cd27605a7f1781e08
MD5 1cdbfe5c90c445edbad10b670c8a2805
BLAKE2b-256 da32c2ccab1029d197d9577d81c59b5730108846fc291a3824fafff96d8e821f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef2d7173b1be53bca2d4d40960506a5c960f56bce480c3cb48c602de6f0dd42b
MD5 de10af33f6753f80c2ce17fa328caabe
BLAKE2b-256 268f3876e292c8b517c7f071353c8afd3c7ff7a05970f3994bfcc91d306b446b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 fe68b3413d65ff38a76ef49ac50718971f434285c780209b38df384e552741b7
MD5 c0acf802710541846731285a8c803a2e
BLAKE2b-256 a6e01ebf333810390b3e6134f3045c8e0d62d10b04b093399817409a66df9560

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d88b4118d787e2a1bbe53189f4cc8e485ff15f494f6ee34843f1b344eed305e8
MD5 7ed30177d09c12729606c57d8788f00a
BLAKE2b-256 41d89f506e33146d831d3de7f96b48babee6a8a60c23ee3a502b71684d024a29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01a020778e27425901d1ed21f2b92cd6d6a66266e82c2f8b1c03c1be9984c047
MD5 60ef74b53a9551d07b8dd23bd951a700
BLAKE2b-256 f7e13c5901e1051e6601e13e37fa35b6f7b671dfcc93a6ac5f90efa9b1509341

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.7.28-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 802bb0e300fef9c60e7374646f2963ff5937ac6056810ed6352a0feb88cc1caa
MD5 67056f3a04d2c5a335ff7f904d1f4830
BLAKE2b-256 c5afdb1af79627688423fc619ab0b9e4824441e6e59fed8936962bb8b7199883

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