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 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.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.9.17-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.9.17-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.9.17-cp310-cp310-macosx_11_0_arm64.whl (784.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.17-cp310-cp310-macosx_10_9_x86_64.whl (851.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.9.17-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.9.17-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.9.17-cp39-cp39-macosx_11_0_arm64.whl (784.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.17-cp39-cp39-macosx_10_9_x86_64.whl (851.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.9.17-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.9.17-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.9.17-cp38-cp38-macosx_11_0_arm64.whl (784.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.17-cp38-cp38-macosx_10_9_x86_64.whl (851.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.9.17-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.9.17-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.9.17-cp37-cp37m-macosx_10_9_x86_64.whl (851.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.9.17.tar.gz
Algorithm Hash digest
SHA256 924d6d416e583782a2b449aa8c2e27199036bf14056e734e84b4dca7d5f18089
MD5 05f57c04d6388676171f9f562157d1ee
BLAKE2b-256 82eca06e6e65c4ae4ad3b8d761c7ac9a3297d564bcb0b0c3b8e09417a7573b81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2fa05fd710b73b2def148f1a3c42d02cd20474f0747535a4cdecdd52510dcb6f
MD5 f9a62c05b7d567474d8ee6315ffd104e
BLAKE2b-256 d690763554e3d2903e32767f5f264ba8a2de4145adc2b99b6bc9b79bd7d0decb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 349d297d667f9df437b2ebfc8d94b4264223448618ae60cb7ff15c338c9f66ec
MD5 b329e98b3d947110589c01a9982fe5a7
BLAKE2b-256 f116f92c7283e5005927b6acfcc45302d122eeadfa9e0193630ca0577c72d8b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 709d70d451937da4a10abc1259d637b2f8ba350ad547159415469c3873ebf8cf
MD5 7a7c18a9723d1de430ca07713873120e
BLAKE2b-256 e05395cfc5573f01473a4907d64c6f4016eb39b1f2b37b3bd3a40fc2673d00c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 512a1ce8f04ebd00f362b01bbb345e4c2f25909c10fa4e4c029b656d37a4085c
MD5 1a48e3da99b484fda7cd47ad7f7935d1
BLAKE2b-256 44b013ef0be978163d6e908500f5ed93b6df0b55af27ee8448baaa64b7987950

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4f70edb3e101494604ea9994398976195cac5349b1244c0f600761b90b5a8d9a
MD5 1b3028cb316a8944f2098add41741b52
BLAKE2b-256 91063a63c1d7da487a3136dfb69501815e3183d5dd0df1ca0a9c25f2e834de2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d4565d376377439cc4ad6653da9334ef976af2e13ba3a5e83e61d12356487542
MD5 f828942891f27c1b99ab0b67e6ff2257
BLAKE2b-256 1accc15adea6b323cca8e7573a2bf1a1e15ae39a8f1df6d4b1bacda16bfc07be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4920f2740f105aa5a3e757f7f985b7048e7fde22a789b101ea2c59f9cb2cc859
MD5 9b80e6ee1f89878a3fb5d4af4bfe5f1b
BLAKE2b-256 6ca5854c6d80bf6a791990f4099bee24ddfaaae0768e2d091b0b711a25d27eaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55d19cb474808774c888a8d75cb6779749155fc443daf6e238106b871772f2fd
MD5 85a2a24da9080b181b00e1ebbf437f8e
BLAKE2b-256 01cc5292b2663a2984648b35ef8c203a043e291094a0bb7ceeca235db2632945

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7cbdfcf41a032e58c6ff14a8504f9f3d58e74532b8d9f435da2c16bad61d73d0
MD5 1bdaae8945757091d231fc7f6c7fd679
BLAKE2b-256 6d153bd4c54f9da0e1bea5a98adaa8e6a68fa5a70d12b7138abd23459d09f131

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bea294dd69bf5270753efb14b7fb40792f81e1a0ff0a47df5a31d5964cefe972
MD5 89e5e1f27418b018ede868133903d96c
BLAKE2b-256 8457111c683b8d0494c07d8d58d4edb8def3473082cdf07244e298367b738824

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3ed9730fd2d96e5db7b2349b2501a0f59a193cf9d1d343bd92a858f99bea09ca
MD5 ef901c8e5bd2e65a9bc232dd1cee0883
BLAKE2b-256 8dff14d7dab65297d2e89064e7c4f5cc55c2392d767bac0357df4abe3f72ce82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 1ec5a72ef7d87675eb659a2579d02dac8171d7dea243a28ea991940fc2e1b6ad
MD5 0b86affdd1e30f27cdfc2d55955add70
BLAKE2b-256 46e109f6bad3f7b2cd50d1d6bd0a4196d743ab9494f286ded00fa1caba3976e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60b5799d99e0a029f4cf27a38db169984513f640596368141ee255a7986a7da5
MD5 86df95995483a1e3a9bed4a2391242f4
BLAKE2b-256 15f5f997b159becf5d4a3d6761cb746b6bdbdf34263cabc8148ab2527bedb4f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc9a0575b4b121b56b2691f8eded9a9530fe0396a6e08a1e935de3ac1d53c17a
MD5 fc80f1d290ba903404bff2f4ab672d1d
BLAKE2b-256 616acc07977a3c28a6fc9e529d3ec272469468dc2f1db9af46c63aa761166d26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b9bedf8dea10dc285198ab5b0f5be7fe7e57291d0bd54d32839afe818be024f4
MD5 390c2df8811e28fd4a80dc4e67bdd712
BLAKE2b-256 6849d61249e27bf22457e21312a2b0cb1f28a819e64435b97a14edd4ee7b0170

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f7609532ae26ffb6ca69fd26dfa41301f5be7131046b1fa685610918ea5efa9d
MD5 95d943372ad00206e5140d22f631a545
BLAKE2b-256 5078847c9d56de6a79a007ebf81e9e3d4f9df3423a808dd2a5764955da1c430c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 203101b1746b9c425eadad8821ff8888b4ebcc9940de6dab30088c966d9227f0
MD5 e11a4df6d3372905efa3005668b79a4a
BLAKE2b-256 7c54e8ebe9b31a844835a9b29231a042ff8c005b6bd7deac0a65c56e4dd301f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b799595fa9bc7dc332e73fe212d09b5c6cd5974735edc87b638d2f9cafb0b04
MD5 d0614d5dc853667d20e7702ee81fc4ad
BLAKE2b-256 ada9e5ffdb49f70817f3db5b4b8997b62f2a6e20c1e9845fd1dce01da015130c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.17-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 18bfc27c4c8ce5a7108922af1862b721eb55479aa9771fec49d51685539ff8af
MD5 2c899823b7bd1ba0ab04e87641fc9957
BLAKE2b-256 8c93ec7c09c888879ad73ba92f5bfb7dfeb2fb152a7288b3cdac7774f0c69938

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