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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.6.18-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.18-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.18-cp310-cp310-macosx_11_0_arm64.whl (842.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.18-cp310-cp310-macosx_10_9_x86_64.whl (913.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.6.18-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.18-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.18-cp39-cp39-macosx_11_0_arm64.whl (842.8 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.18-cp39-cp39-macosx_10_9_x86_64.whl (913.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.6.18-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.18-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.18-cp38-cp38-macosx_11_0_arm64.whl (842.8 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.18-cp38-cp38-macosx_10_9_x86_64.whl (913.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.6.18-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.18-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.18-cp37-cp37m-macosx_10_9_x86_64.whl (913.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2024.6.18.tar.gz
Algorithm Hash digest
SHA256 208507dcfe4a9a6709d3da0f081c300713c895b8e12d58bd4aadb9d6e5e1a8e8
MD5 0cd0406562bfb93a8efbbed84deb0a21
BLAKE2b-256 68618527a3ea21f7342afd1f014621b4710353f40b083edd305dbc236fe5be09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3e2942369c4c476b71984c999584878315a6492dff30d7fdb38ed4ce597395b8
MD5 3e3171519b75dfbb70f1c7b3f777adc1
BLAKE2b-256 96266fa2cf4d8e0849863eaeb553c7e4243ee56bd44e24606a592e699d8decd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eaedb15cb84e3d7d585c5c76bd30bd650d5a259421dc33b92d199d913f000beb
MD5 d8c574d5da5bc57e0d1a87bbb2062869
BLAKE2b-256 516f47e8fbfefbdb493baf7df9ef658c1553e28f0166d6fa1c61f1554fbbf906

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0266a422b419f5d08030fb788d048667f85a7a3d816d40d8ea87437f4efc074a
MD5 c3c57e2545c222dff46f5becd9486cd8
BLAKE2b-256 ee29ba275ab1dd51137cd936dd5246747294b55781a203b7c917e8e69c2ed7a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac6a265d963a868c3610cb3a34e69c953b8c23217d97b882a1e65d9f1b4669e7
MD5 a4f472d9ded55053b35da0377735bf2e
BLAKE2b-256 912ca671a87ca5e90a79c6b970738f646e2199a6aa386b03090ab3ca87779344

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a08dfd2d030c61bd31e3c83f358751ad3092e343d21b5feced6b08a5b1fa1663
MD5 f3d4ff8f60e2f5356fdcf624b3b8bb12
BLAKE2b-256 4437cd9e9d6d6f6a177552ff637cf253002e7b98db8b1e5378f1a4d28c17dd98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 66c503c7a640858612be1e7eaf47f1773a5973177996ef72bcd2c48eb80c1ba1
MD5 91ceec31b41ef1076924995dc4be118a
BLAKE2b-256 ef1d71603d99b97e8fa27ee080c4c1def2c9c478c67fe3d70a67cb45167dd4dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 63fdd82825f6c37f6460d3f834afc0b2fabe548db5bc38d4a40f18165a22c990
MD5 855b6c1cff30144c94981e704921345e
BLAKE2b-256 8c356aa32a849b5d4f4ba89d1721a2cb6274d32d3cf97b0785819e7d0abe1d1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4a4ffbdbe8829df7892c2eadbf35a1a762a945df8f84764753def6bf80d252d
MD5 c9de04465df4cf4bf77a347c389af0a3
BLAKE2b-256 a66ebe60f9248bead3570041b0deab263e2d3c0c3c187239b4d582a19b497e0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 490eddc5c348d7d7455c435e01aa15265e5ea6b61aa499e9ce707b21c1f56c86
MD5 9de413664431428d8d6fd1a1f81b441b
BLAKE2b-256 9ac7136a3985c5f3de99350da8db9dae05a5f1442a9a616c286110c1bd041cca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 87580d7a8d69bf2bfe83759cce50e398d04340c5c2fea10a32c2743976ac28b4
MD5 a788a048364e13e775760216393fa354
BLAKE2b-256 de04819440b9f14d300da3c43857fba23579067dacf31b68e56377d920124bac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d319807060476384d372f9a6c5eddc30103c3f1bf57aad270f8b0df6a2fb98ff
MD5 697e71e98e081c02a3caa821a6862511
BLAKE2b-256 bf5a0b10c973519555673dbda776bef35e483ce6dde12cd00109858c60b7c8cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a2c88b397820bfd7af53b4bd1af6bc7d128ea3610245c7ca5021977fa4282e04
MD5 0bb509704695316dd8841e96c0a03a3a
BLAKE2b-256 5f19b1d52530fc5451012f9245d485235b25fbab80fbfda2df043ed708807e20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dad65fcfc7d4b882a7f06ac50f96d39a0a845f74a7b42e0f41eab7748d0dcd30
MD5 e2eff60ffe9fcf88702daca425606852
BLAKE2b-256 94a1bf5ffa5da18f1e5c29583c233d1cb7b770efacefc9bfbcaa7da91b13a6bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2255d1e04b3a72aebbfa9dc25a3dd13a10c391e29be261712ca3b0bf5a2c946b
MD5 036910355ff417e0fb95755b24c77d7a
BLAKE2b-256 3426c11e7b0c5621313f1ffbe3247fd806fbfc6e15815bc35fdbc4b2f8761aac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d81e02c9109c980929d060182013f9246d2cb9ae2b643cb29e89994ee70a3bba
MD5 f7184d630ec4dc339c8f6b60f27da896
BLAKE2b-256 24343c3a41447f22cb07ebe5c1914818b10605cd3cb1e3e88471f0a2000d7178

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ee751b2c4cc13fecec5e128f052b7d3f247a6f1c3d63604a5cc6e76f7210d4c3
MD5 b822b66bab19dc85c69fb4a68e279df5
BLAKE2b-256 be3957c6fec9d205e6f45934e47ed412c122c55bf2fe7367f8cd5e4542e75c81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ade417de11f1f9055ad64b98d3444ad5d5991a6b208767cb99ff9df6c5740d39
MD5 dc6b7d488339ffd079335d84d235fdc9
BLAKE2b-256 ee3aea9cfa0bc79a5121b67bd41a2e0af44661bc6133658a0a04f03909279f35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e14192d7a62dd0fc73f20d44c8d38aa2891884ef0050e0cbfdd46f2d3625c270
MD5 4615614935d3653ecb704fcb029aaa68
BLAKE2b-256 fdb76e3a1b81bdfc678e26408dea3cd10ef29924c5084f05e388283e3b8efa34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.18-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 68bebafb9fc391375cbb80d6a6c12455e8cd8d7c1b1b7dc212ba312c9486caf3
MD5 542fe5c9c255523d3cf42c40d634f108
BLAKE2b-256 9084df7a1a63fe23ffb1dd4487b0a7a0d5b204f9589b261b2cb96f11d236855e

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