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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2022.11.18-cp310-cp310-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.18-cp310-cp310-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.18-cp310-cp310-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2022.11.18-cp39-cp39-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.18-cp39-cp39-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.18-cp39-cp39-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2022.11.18-cp38-cp38-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.18-cp38-cp38-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.18-cp38-cp38-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2022.11.18-cp37-cp37m-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.18-cp37-cp37m-macosx_10_9_x86_64.whl (858.6 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2022.11.18.tar.gz
  • Upload date:
  • Size: 161.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for cyclonedds-nightly-2022.11.18.tar.gz
Algorithm Hash digest
SHA256 0da6659cc861e788278f8124ff2704c18eff4bb58d8e8eb51cb556ac8a7d652a
MD5 f73784d60641685cf3c9a6148d07e492
BLAKE2b-256 47e9717ce8050495795970a48be6644b67a2feb9d8fd349fedcc01194c97dde0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 87c390918c6cbe3cbc695da1e9764d141ba801613269b207e57cf59cd9d59031
MD5 46c7ab1659418503d633512abf2945cf
BLAKE2b-256 06486efd9565eba88030b4612c727982d43f3ebc391fbbcd38c2949eb0159d7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 179e8e59a512c485b1cc4b2afa99fa01e648e8eb37c445c0cc2cd55fc0bdd1fd
MD5 90465afb8b2ed776affd34a5a1f01023
BLAKE2b-256 3d0b9ca6784b9f8139b6116676fb06365aa63960e19de108560802fd1c0a3918

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7c4ab240cfde24e989ae074a012d3ea5a1e992a6b0f70fb4a8c854ca891d297c
MD5 af78b3b0787930aeb8ba963c126ae070
BLAKE2b-256 760b70edf0b4134565fe064a1e3087684595b499ab2454dfe9803b1ff51011f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4cc1f9b262f242c9db1edd6cd0366068807498243e750ba9ea0333c8115d905
MD5 f852af1f59f436d7d3533842e6a9d930
BLAKE2b-256 f27b1d941ae1576872932924491c34bde7de129c653378a22655dae8bdb51a3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d44b9ce1d6e225bcf0f339b43bf09901737af7fea30644cdeae3af070e66a38b
MD5 7de468f58a5273d71eea08e4254539fe
BLAKE2b-256 195bae120bcf6f241df666b41cdf6251357ff98e73e62853ac516d1b60992eb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7a3f0ecab65678790602c19d928d5365cfd341d95a741075569a7f090cb373dd
MD5 1a628ce737e61ce60e4c1a56a9f5189a
BLAKE2b-256 0582c85d6337eeaed8a914a21d2b9ff2da6f65f28487efde27dc70f9881a7e1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4c86919994ccc5b7c4a9b83081874a1504194824ee3ef72949e8be70187c2d82
MD5 68996a0ced342e7b0912e81ccb2d0598
BLAKE2b-256 f272b112a459b195921b5889f4cfb747afcc574e795f0dfcda7c5ebf46428833

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0e160d4638edca173692c5b9c04ffc1e1536beb1c72f84fbfd3bf3bf311e394
MD5 a2ee7c468419723715380bf2e49dad50
BLAKE2b-256 7595d40860b61adac5e73c503bca9dbc8c7a5f2bb29de53fbe5b4ecc0173775f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39e4577a508127a23367dcdc3b33d78c5dd87c6469d1f5ac4e397f80ff5831d0
MD5 b893ce7aed533127841e56b4e701f584
BLAKE2b-256 cd8e17052007ffe0ea3041e9c79db3f96fec4d6c271e67804ff05fa1f97eb0ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9246ae7356f614d2b58e66aa369bff5d1334765dceb62aa3edd116d42532ecee
MD5 8f182125bcf5c550248543cdbb4ffcea
BLAKE2b-256 96270ccb2a5057c780f493ca2e0a21013236eccd7465e2ffa96b9e26e6fe02a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b4034fbcc455fadc7cb99e7cd7f761b34c7090bf992ce39e1c363f0c2b7385af
MD5 f27443c37e4190073a7493e52daa3eac
BLAKE2b-256 0006d927782e0a798f6df11ae532d8b1dd1345dd2418f747396cd6246cc53b04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0d8d2bf570d19f48c70e8fe79cf6a9e6a6edca3cb8ed4ce8bf2f1734adf7f69e
MD5 627d04c06d83e3da2adfb93173846d1d
BLAKE2b-256 2c42f246e427c6d29992aec7992e15172c2b2c15e44f299863d937ff05311144

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fd506c6b9bdc9588af03c7a3760f23ae1b4d3501e681a0bdf594e35fc5cfdb6
MD5 f61f25ef25672e339f490765b5b1d9d6
BLAKE2b-256 2f43ca6ab89209b6156d5b51aff09d64d4d7874cc5081def409f75d3cf13d310

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc2ea386d4ac85f2b7c620cad5a0f457f07e0ac9d481dde8de5c04ec00b82616
MD5 f984ceb63ec694f6c4e70f7a45918dd9
BLAKE2b-256 fe07e778da0d4386edfca9f8cb4e95726350d4dd6d4a66fad6a0472199c79892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c4343fb5ca8fa0d1897155cc38f9e9a97d530d396834c1c4a529dde4467c6cff
MD5 4325c3f9f405ff36eeea39e372a3db36
BLAKE2b-256 df0b54e9b4e5a16f01a524337889e5385bcad55831111dc76054ff0862207a58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 707229620e6f88a8f40cfc052b64732deefce2fbccfd288c48a44c6b3abaed18
MD5 135231f796f9f9827dd60df105f7c52d
BLAKE2b-256 c02b5b3e8532b0f4a91046d35093220e60185132b975ff27600961521f0e69b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 30ae96c9a0709d0fecb76db42308223c455da6524b24904e19faf9e7bb94087e
MD5 e8d4ffa42ee451424b8808b0557c4ebb
BLAKE2b-256 220b2addd62d7ed6dae5b7102c822de56a8a452850e3336afb22c6a88e8eeff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7e3bf9d8a133dbf42acd929cc72e4c39e1c6a4781ab2eacfcc84c6fff8f9c71
MD5 6b504225b6dba076716a6c98f539ad96
BLAKE2b-256 449ead3d7c539c98105cd6d46b017f65453482772d74bf8d4f619e75519b5532

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.18-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eb6a213c886de9478b47161a29a5a462107a93dfa97e747d28657dacbd0f9d47
MD5 02f30a52701c9b93a08beb4a9621fdff
BLAKE2b-256 5bcf696030a029a6947ef137f08ace77a693ef624cb370815182a2953b2644ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page