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.

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.

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.15.tar.gz (157.0 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.9.15-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2022.9.15-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.9.15-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.9.15-cp310-cp310-macosx_11_0_arm64.whl (784.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.15-cp310-cp310-macosx_10_9_x86_64.whl (851.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2022.9.15-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.9.15-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.9.15-cp39-cp39-macosx_11_0_arm64.whl (784.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.15-cp39-cp39-macosx_10_9_x86_64.whl (851.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2022.9.15-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.9.15-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.9.15-cp38-cp38-macosx_11_0_arm64.whl (784.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.15-cp38-cp38-macosx_10_9_x86_64.whl (851.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2022.9.15-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.9.15-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.9.15-cp37-cp37m-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cyclonedds-nightly-2022.9.15.tar.gz
Algorithm Hash digest
SHA256 e965d22e55de6c3c491bf9d2dd47570f415e95b4714eb9be6c7e4d6b93d827c7
MD5 ced4760c360d7ca4bf1ec8f49231a40b
BLAKE2b-256 a6c6a2fb6c3884a379366aa59907fde2a2a1195f776bddf9e2d479ab9783d4fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 41afc7d172345a3dec4faef805f6957b811f68c0ec176d3625fc6dc08237c202
MD5 894dac2ec6c37892247dd51cb9c5ff84
BLAKE2b-256 a58644f70f44f8dc6479f68e184c359738ff0b48f404002ce9b0891373b578e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8ac2876bf47486a5f0f8add8b9ac0ae163901bb06a95aceca1b745a9854d4087
MD5 94176013f69810b64e7998fc74d08641
BLAKE2b-256 252bedb3b477a31229e373bb373df1747c0703bc69f45b0beb4e98ccee365d53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45077c80414e794d59f4a90cfacfc96f9077adf989cdf86b9b14819492ecd167
MD5 bc1000e0c2c1ab4f5d65ad169b5975d8
BLAKE2b-256 af08de2c96ff30f1dc6ab7bb2047e9b6939740085491084e576677a878803adc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bac93e8176cc0b0f617d3fc596301360ce904fdcbc7b165aa3e91f60741d4032
MD5 3b18eefa1434b221630064b8ee8a3a98
BLAKE2b-256 15eaefa7b1461e8979a0383a4812f41336180d6ebbb0b93f3a2e00d8046da783

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b207bd2e17467b0a3e6e3980c8317955e2aa4cbea2261f227ecc0d4d8b83576e
MD5 8524873d4fc54de338e0f3e160c1e2f2
BLAKE2b-256 ec8acf009dabf61378297219b46c43fbd4e1af85220b7d3083216f5cd1cef849

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bffa076e2906e334bdf0faeee59fe0e11d459a18c7cea2728bcdaf0a5879059f
MD5 cb5b79b4634ddc25a250e4d4371d1226
BLAKE2b-256 83105f62ec2ef222722e7474d77010872d1c12db7e82c1e57a335cf9f34984bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3f8f1e02498d8f1f921500f2ffd271155433c3512a71e81e97f8edb4c334e1ed
MD5 69cf9a6ed29ccd75aca0df6c0c2d9de8
BLAKE2b-256 8edee5dc661e3646651e1e3df4700ad693bf92dc79074be5f1775cbcea9fa86f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de5d0b97a085304bca62ebdfcbc6e87aa0cc3268067447475623ab721222ee80
MD5 be1705f68485c301ed105ae82b526b77
BLAKE2b-256 860798fcd794c817146e160bf4618e156b53a451ad2100cfd3ea5ebc664624f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a58eb5247cfd75bbc739d8dc3dd0430edbd9f2dd5f4acb9dad7fc38db2f7ed41
MD5 bf2a541e44acef4ad8c9b61ca8bf0038
BLAKE2b-256 42623154d604d03449bfdd15361e0454a08b7351d20d7df5299c2b6d92ca8f0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 850eb424b44ed772388026f75b00db058d43c2df3058e1ea0cbfd4fb36aeb5a1
MD5 d057e60058a4456d1b3bad2f724d944e
BLAKE2b-256 e29d63ffd6fcf0fc4c1718db5e2d94b588e0fa909f8fc2a67cb316716731b42e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e197f9e3014d9ec5d54faed6a49751569b94e04b9607640fc77b548dc959424c
MD5 b588941fa53d7788709e004e255c7e66
BLAKE2b-256 31717b34236b49378a681f9db1126c353ee4a4058230880426154fc98f0572fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 64d944bcd9a5492166d2d89a59964a61ad666ccd0c018625187f464220e3b6bb
MD5 ad01dc48e850f6b24200c6748bbce8e7
BLAKE2b-256 a61aef488cb5713d80c8485a8a37db3109f9604b85454bd80f447de1e323965f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35aa60098a922281fa43a276139b025567c94b1ac15ab8cb59b5237eccab09eb
MD5 2f835269d6c1f20d4d781d8c33a70aa4
BLAKE2b-256 5acb8d7b2f10883fd9a898952cd0f66e63a11f584c36b402bb9a30e06ab8ad79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba2cab1c371754b9a64cfe779265f7e18fa3175a8d95a666f072235050fd50cd
MD5 242ca3bf2ee826053c7cafa634723364
BLAKE2b-256 e4561693938bdd9a64ecb990b1dca6a74dfec623337f79325dfff3a8380bbea0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3670d9650524f784e5c5b83221096b40970f27a63bf62b32482d6583cd41b54e
MD5 9e71b12bd4e3372e6c0dddfd33be4c0d
BLAKE2b-256 b84a7b5f014634b4ae684ab349b7c6843862e9b2a3f6d6f8bb31b7c7871c14c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9057365ac3b44264367efc6fdbe287e4e4074aab503b53a5cd97d93d7ca46dd8
MD5 84a253f8f5da41a8ec2d3491ec07aae2
BLAKE2b-256 5e166d5e7494d1ebdce18ab1ade3acc372bf7966a2dd788ca37f1ee3f9506425

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7eda16c4e86ffdd84ae91d1a63c7b53b504a8fe87400c31003cd89aed48e260d
MD5 f542a6e4f24cf8e01a950626d91c52e1
BLAKE2b-256 c74b10d2d074e9a9ee1fe04f9c10b99d7d3aa770002c994b11af608ce6213dec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13a82ee0fa4a57c59a944d1116cd8c2e7883095165a7cd216741b6a4ea8b5ea0
MD5 3d993b474fca801e21988a202586504a
BLAKE2b-256 29caba1b9505f425db2d8c54eae2c892152c465f3c733b7f40b0266e6f40aa5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.15-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0171f4dc7a582ca997ee184fd1d5af48ba65c41d80260b37ecd6f3a6425e7a3d
MD5 5f41b32d1e8c29ccc33518e473f0486b
BLAKE2b-256 bf42442fba3c1c20db76757790e5f328bafb2dcf1dca493d3ded6d2ba81f2cb0

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