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. Make sure that Cyclone DDS is built with the ENABLE_TYPELIB option set to ON (the default for this option). 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 . --config RelWithDebInfo --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 . --config RelWithDebInfo --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-2024.6.19.tar.gz (161.6 kB view details)

Uploaded Source

Built Distributions

cyclonedds_nightly-2024.6.19-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.6.19-cp310-cp310-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.19-cp310-cp310-macosx_11_0_arm64.whl (843.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.19-cp310-cp310-macosx_10_9_x86_64.whl (915.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.19-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.6.19-cp39-cp39-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.19-cp39-cp39-macosx_11_0_arm64.whl (843.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.19-cp39-cp39-macosx_10_9_x86_64.whl (915.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.19-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.6.19-cp38-cp38-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.19-cp38-cp38-macosx_11_0_arm64.whl (843.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.19-cp38-cp38-macosx_10_9_x86_64.whl (915.2 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.19-cp37-cp37m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.6.19-cp37-cp37m-musllinux_1_1_x86_64.whl (7.2 MB view details)

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

cyclonedds_nightly-2024.6.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

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

cyclonedds_nightly-2024.6.19-cp37-cp37m-macosx_10_9_x86_64.whl (915.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2024.6.19.tar.gz
Algorithm Hash digest
SHA256 517425a177c94c7b6fdded27e3a933455dddb34e1dc6aa283e812141f8f71a02
MD5 e9b1a5c333cf312ede56f06f7874bedb
BLAKE2b-256 42cd44c9c220a0084526785fc67aaeb7112911bcaf8c8c8b4847cb2c22d0e0a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e39b79aba6b73eecc361859d323b4fa79bd27147812bbc5e43bc2255e5959301
MD5 244b1f9215841e39122e10a29b7c4afc
BLAKE2b-256 d551da279c27bcdd2f29cf2eeb54e46e5f67dbd928b69e249758ac11f718aacf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a982d9cd35bbdfdaca60c5c4d28df4cdc3faec60f837b89ce82b2085b48e0b46
MD5 4344b373df23eaa86dff4965382b12c8
BLAKE2b-256 0d32eeb9f67338f57a86125560dbd7c448c62c436c626f5fab20d04986539a5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e28762f083fe1f783f191fef4a96db933250b9c55b473bffd98e3e72f53a02f
MD5 de953dcf38bfff625046b9f53dacb985
BLAKE2b-256 d04e7216bcd8ccd6acb69bef67759b69f13bfb416b42fdb725dab5b78f4143e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1963a2a0ef6007edd7c32f7a44c1fd321b23a8b2a19e6b836cd7085c7e3ed579
MD5 9e0f4fd64d21eec968a6578bde65992f
BLAKE2b-256 764cf73c30980361be4770c4f874e455da93f179409ae9f4a30138c376e2f78c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dc7517a491060897fe6f4403401f588ab3a82782060bab73fbeba78d4c6108ab
MD5 7ce2515a5e6cffe83a2d8da5589fbeb5
BLAKE2b-256 ae7d7fd195315c4aff003ba780947bb40a39ab1e9cec45b964208f4b68ca4b4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c453f7ae52facf78388265f31ae8cef2709eb583fc3606229fd16a2084625a5f
MD5 ff15d48906c85b99cf8f86c1c86247b8
BLAKE2b-256 1925e1332c7b298df69795a6021bf31663d722a8426657657b6eb8b2009707b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 1ab8c23c45edc672b66539d3610a768619f618d30c8fe360cd793a439c1e89a3
MD5 4885c10f89e42122fcb9272e49cdb6c5
BLAKE2b-256 a2aee136e72def36b0f9a3d2c99f6bef05a9a78d4ab90c3395c2a436cb180b6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1540e8260bbc57e7fd5efbaa98727e796561bd49380f5cd6d0ed01d4b891df23
MD5 507f63a6e35bd07914cd0eeb9e9d3f43
BLAKE2b-256 dcd528730b851437d053d7a311ee98e6583b0136f6c176930016c337c1c91a5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18394a7f5af53c98cb3f753b28eed2c20d3607e6a25b9a05ef91dc417a642715
MD5 97470bb3e65c0813068a9f9f6c659178
BLAKE2b-256 f6c586554f05195de1a6ecc9952f794d5700d1bedbea604ec99c27f87700cb02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb5b4c0fe272bd0bd180a08102e7e8cd3fe3be0902ad902dd0fd29bc6d77db20
MD5 3f603ca876d213840f4049c2b7ac3596
BLAKE2b-256 ee159e420a77d4d5270b0a52187016c30e9a61464b4300587989e8779b3e06d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9e22c9cb41f58b6c66928cad8c848790836db62dfea4c049e948fb27fc6e231b
MD5 d7e3ec0855cfb5f97733cb6cd0259eff
BLAKE2b-256 e6552b0d3fe791f3af076269db5892f9a69f88d3ca6070635c811931ad17c62a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a4918d3b7387c5f69f3e2851b8107fa71eea26eb908e78090c72eee9030cb43d
MD5 e881fab3a2fda8fbe18c77aa9ece0cf9
BLAKE2b-256 85a6f1992840f1d6e8d46e0030a930c2cb5fbb8772514386c72809198e82a2b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cdf30b073e2d7afc32cf34471fb9137b47e7bbb3466581b17021cb753c806bdd
MD5 e401f42d4c59009bd69f1128fa89926b
BLAKE2b-256 d51d89497632de9ebb4dffe49e8c62cfc3e7107fe6530778829dfc5b632e321e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0262ebc40b6322a95f3c4e4c99201e4e689562a2d4c361728563278d92f6044
MD5 2e4195ced474867a031f931d1dac149d
BLAKE2b-256 7714dd4b82d42088d6a2dec00732db5a856bfe954a241979a2dbe65ede8a47eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5400a3f9dca54d86c62792270500381131c60002ec8a5cec97046115a9ecf544
MD5 87146af4f5f139958eb67463d3a075f0
BLAKE2b-256 cfc7685c0ca286ba6d9c915dfc7f58b2af3e797b40feced4e12844a8487b3654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 21f7984e1150d899023fb116c32dee162855b065d5ed581b197de30d51bf7eae
MD5 413d24e2808b0943315e31e8836a3b00
BLAKE2b-256 8b6bad8b9b70f8b9fcd66edea4df40a137b604f82160fe805529c8ce7db8e6d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ef9779b9e2603062a2e166d23548ff5a0fc88aecba37ad86d3666c9527697012
MD5 d205f75f640631caac4567e89de26d9b
BLAKE2b-256 c3f5b72434588ca7e0b96e42ea7502a58366f8a47499945e31661a4ca4c3f7cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c3b61e7f42b694bbb06b45bf5b354fd9ff255594de15ac12cac8a9bd6f225aa
MD5 96f2c5e7a2352ef4fcaf62e0648557e3
BLAKE2b-256 800ba05423780d2ac0b5bbe2be97a952738431384d3319b2886a6cd5ad193a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.19-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fead1c2f9cb1e1fb7b9ade2eaea91a5caed596a92632e9567859b52968e86c8c
MD5 9fa7dff83f74aeca752f075bdf2c85b2
BLAKE2b-256 6649d2aa2610c71e2a43da552b2f2764df8e8481b57b4507a5dcc61965b06324

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