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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.13-cp310-cp310-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.13-cp39-cp39-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.13-cp38-cp38-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.9.13-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.13-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.13-cp37-cp37m-macosx_10_9_x86_64.whl (851.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.9.13.tar.gz
Algorithm Hash digest
SHA256 2fe02d7916c9b53f5667ddce0ce7b19fc170e777d165626e2c5471dbef5deba5
MD5 1b4cc1b4d03386fe0fe5dcc7d8ffd374
BLAKE2b-256 d5550a499eea7c7e1d9bbf3f1c5f327e3fe90e1cc9bf096d10f49b65982ea395

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3273ba5549431b527075cd81206cf106b868982000ea2a455368e4aadd72bc8f
MD5 00f25ba1e401da797b50d44c1ea0733e
BLAKE2b-256 73e24b5c54f1f807b3ff7bb17818e80c02dfaf3019bddde81df22a52ddc30e9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 59a2d32356d01d386023a1cbfe1b1de5a8849bc24c5b6936b5a3c3a7ec52bfff
MD5 7947d1a979e092dac851dbade0ccffbe
BLAKE2b-256 1e6c33ede77a45a7d9cbc89298425209a25c4a9d3d999ab6c73aac204184ec0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8205ec3103c327dec3ed0beb138333034c9244b6d31f0c44d6ddb92ddf34bbf7
MD5 db8cb6caeffef4a9283c980aed02a61f
BLAKE2b-256 a0bdccfefd9c5ebce8d2edfc48212a518881ff8eb9461b18f97e6f8242d11ddf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c21173580ca1b79e7c5c293a0fc273f3613d87ee48fde077622573ace676252
MD5 3f666f3fd3d200f739b7dddf1ccbeaf1
BLAKE2b-256 f2db9249f764fe2165ae6803e2e385257d971ddc6c819a901c00dbfeeae75591

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1023d527660d1cdbd49dd7470e662b9d807595fb4bad465f5090c8ba37f46379
MD5 02c1f2edb82f372df12a6096c9bd6a58
BLAKE2b-256 dd474b34d808b0a8133eeed84fe491e12d0d84ae4d139623215c28543ad4eb17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d9e04e297b7e5c1782cd1ff8a7144512843015bc511e9f001b79dd924897f10a
MD5 eab1cf491ceecefb7ab17c6c3a294f4a
BLAKE2b-256 23c146c52803077333405fd4cddc4b03c06089ddcf1bc1bc62658b0d19548e87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 129ac6a54f8b9c0bc8a7d5906a8644d38efb5d214ab252cc0804027d5112fa68
MD5 3c94f283ecea592bc157c64fcde3595e
BLAKE2b-256 bbd185365a1fe8b92cb6fd86baddaa5ceb8a832fecabb29f71c5b377be9531b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8f5562da9c6b79166ba9aaa590d07bba906711d1462f2cab8605b48af0d6331
MD5 aece75e4c5712155e2ff3794312625da
BLAKE2b-256 c310890e4d1ab7b503bb7a1703df540d985146338e5e3291a3aef0c4c6727e52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9124df272caf8aa67a41d382df81d077edb0b6fea5f472cddc353c6f20e4c652
MD5 df6dfb73f260f6540a91dea54b5774fe
BLAKE2b-256 3755260d75839a02630cc4f059c038d2a40f361df7db2ea01f725321b91f0a8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9413beee725ab59585e8e4770d72b19a44575cc1885dbe4a7a24fb7d37fd5c04
MD5 f85898da21f14798444c337bad341708
BLAKE2b-256 f00a5aa59994895d14eaa081f83ba9e52644585512f9c29f8168effe12b49050

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 682525aeee6d5699aa347283402f17238a7567d6d81d6a11ac4fa9d26acdb217
MD5 f1f2f472a286aca03f33a353f2075d74
BLAKE2b-256 389551a4cba1ad039ae63628a9b7097344417c25c2f87b3e397387cb82771ad9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 28ef311279bdb0b56c897f1e0fc709a18d2318d5cacce5750f4c269f43a68f3a
MD5 7a20f308e6ea85f7aab1b098495aba62
BLAKE2b-256 6b029da50972f20e0422edc66212905c225aa618453e55ac5f9a50d5fdcfedeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d414ae19ed49152ae751dc88ceb6a3097b345ea39fed18593214fdacf8eb0fdc
MD5 f5700f2774b74929037947e0e8828326
BLAKE2b-256 9f06ea0dd9e2416474b5db02aac6831080c9e6c2f32a628ba468b324cfdc61c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d99fccaf3f94eb8ab3892ee859c46b980b146550448099fb5200d78ae042ff0
MD5 66bda830fad495c7cd69be9f64e02694
BLAKE2b-256 51f5826ae1bca7d37ec5e3dcc9d7029313ad42056cfdb1e57c3e497b26272d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 63d2bb932b09ef557ab05c3c25dfecc6aadaed9c6b57752f39f7e6842828f50c
MD5 edba12ba9fa1a0a0ed4d1a1b547540c8
BLAKE2b-256 a7e015f0b264ec3949379a8c779d73dfea36666f96ae0af217ed1b22c0167ef4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f29f958450a52a23b38cb2443843269440e6aee74ad63f42c4e4a72b3fb2a87c
MD5 0f4fbc30a4946e2f850ac3792a205fce
BLAKE2b-256 838c0f23a802a527352fdaaea9bbaa2c16b511e8237075b3ca1b7f3a65087c74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 cc8fe5730b6a47419d10916de2dadab3098b792c5b9b92c1e26bd1a47c9cfd8f
MD5 bbecb7aaff1c3349436e8e0cd9e648bf
BLAKE2b-256 a5be2576820a703db940de93989c26974194ddc5a4ed6f842a6c924bc2ef8443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38fb6b1309ecb83d84b73585a401d39ee0e62fb9b050ebd5e4d4a6a701f4587c
MD5 077fd9731f25746a24791140ae64187b
BLAKE2b-256 fabe0e1f799e80699d69c79c80173d6c3e30d2f37fe227ac248c89b45935e47a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.13-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a7289cc1424ec210b12417117ea27dde0bca3d3a5b14d40ad0e0d72408ff9a5e
MD5 0edc5c21fe395153640c4e0812e10388
BLAKE2b-256 37a459af2ea2ebfe4b2ca70c970ecadff27670c9d9a9a07cf246ef7511f3337a

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