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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.6.5-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.5-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.5-cp310-cp310-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.5-cp310-cp310-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.6.5-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.5-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.5-cp39-cp39-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.5-cp39-cp39-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.6.5-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.5-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.5-cp38-cp38-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.5-cp38-cp38-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.6.5-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.5-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.5-cp37-cp37m-macosx_10_9_x86_64.whl (911.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2024.6.5.tar.gz
  • Upload date:
  • Size: 161.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for cyclonedds-nightly-2024.6.5.tar.gz
Algorithm Hash digest
SHA256 284cbb2df22558410251c9651528aea113b9d74e80d3ccd98d603ca9a3ba5a2c
MD5 61daeab562e5e84f8f7ceccda2557f32
BLAKE2b-256 6e4d4cc08b0f8a1e75f8c71d7668bc43ce840bd1436e256ca798c8046dfad06a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3accb41678c3f0a30f1a182add99110de5e055d4e60e125b5f2ca3f0bc534695
MD5 941d2ce9ef64fba4ecbaf879368289de
BLAKE2b-256 4e0c6488ab6e37eb5042fb92ffc844d1ed07f2a720bdd496a769749e0ad85525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2212b476ef75dd85b71bd39f3ab7c26bdc0e28addb2e639f36346d57b7d6f3c4
MD5 9ac4a5f9fde519f112f0413e93dfdc72
BLAKE2b-256 d63c6e474cac09a11f96b5c725840e704bac1605710db7123b83295947ef8f19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 022b949fd389c51352780eecac6fe7c6a7e0e6f21d0c69384331a3c534319dcd
MD5 cf8952c5c08b86e182b8c672891589f1
BLAKE2b-256 7603582d728184527f63aa949ab3b91a9731db09c8b5a6eeba9cf8e0cc48393a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9656bd2abe688c5adaedac32820d018fec14af3dd3a2f376661c577ce255d3d2
MD5 90e817ee1a80a2db43d8441a0d407b3a
BLAKE2b-256 bed1e7cb94a7bd3b2005253d201a1cff511a6f9227a349f0e9131f536be209c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e87e1499b8f187e9b6607f48ca44f1f52c2b6d7f7a97c5cc8d24960ad09ec8ea
MD5 327b2a729028f8ff8753c5aa65ec8dcb
BLAKE2b-256 12ea23534ab68da341647ba02ff264ac54d42e2d8dc657e5c55ef910a9aff5f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 99fe4e0ad09cbd15f71aae5afe16764dc387b02df7110c8ad27bace62865968a
MD5 3f07f73b65df165c755fc08ae3306258
BLAKE2b-256 aa64a5a9521b40190aeddddca98777bb3c340a659b07a536db513a96cbfea0c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c4c59860be52da92feb57483f67dbcc71994555bc008accbbf459ea8096430dd
MD5 e2bbe2099fbd8e01e7a4a5df8d93bee9
BLAKE2b-256 ea641c18c6f2da8a2b15315d531083b7c0433e45c2dff534ac082e4bf0db5ba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c903f47343db343e3161a1f3d2e6b4d903cab104ce0a1c815f08c97c37571aa1
MD5 a60b164446e380c33395699f0b7bd226
BLAKE2b-256 052da9282885cde73c93d97072e7cbf3f6e54227bab8f8e6f2608aa93515e61f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfe14c17765c283846c225deb1540a8d617aa12b7ed587e639e337b69d821774
MD5 c616289aa98c336c251183920970ae64
BLAKE2b-256 a86cd268441fbba1a23b10e5ac614486ca43dfa82f0cac7fcf4ab7aba3b7cd3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 16e2a0f85b490312e0756cdd4a15b958f320c9c726bcd644b44bd8eb887a7a08
MD5 dffb09f3699759094790010d8223184b
BLAKE2b-256 536418d1053420c1505d5f4b5288db79a77bb2b23625beafa55776a63cc18d09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8528b7920abe4f4c1e15f80a12f70ae473de637e4d74c30d560afd7b942274fe
MD5 5faa7446278238353aaaa4e0e4a09715
BLAKE2b-256 042a65153099d6fd9cef0a157b350dc5fe9ae1694545e5e4df9c83ac753035a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f47f27d3e427351bec298853522743be978a90db4b8cca199b8507df84882676
MD5 a4fdbfa44d93b46e6e430d8c7425be5f
BLAKE2b-256 62d5b34b38ae1b682bf25491dce0108f61dfb3af0aed3ccaf05b9252c3f58214

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2aef910f87822226480528336e5377ea5954e76fcc096dfcc2ffcb0ec78cda61
MD5 64fb54ce4b20e1c3bb917eb9a893c667
BLAKE2b-256 5e2a1116a7e8fb7f2b7f27b116297c8e4bb9244cb91a516ee5c96737c85915dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5968541818fdf19707ce67acf312b97db09596a2932be56e0aaf7bc6b36b169a
MD5 90c207fcdd08666ba28cd9b669d4b8f5
BLAKE2b-256 656eeb05f697984e04296618d2bc2ff22d6d74994c3a336c8454b2cbf3783c3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 55c19577910d4ee216baba78a9ff4cd4de3b3258efa0fd4c45ac39d7c593e20a
MD5 56f15f0a1f650c389d9af90bb74e7914
BLAKE2b-256 01b3dbbfa52a6ff062b7bd42ab745e2b83516524b394e3e6b217b0e5c21a702f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 751187835367d89acf4e32a0403eb3050fe02967206c3e1b47fc58227691b02c
MD5 3482cc67a16bf511f549f99350d66312
BLAKE2b-256 948d8a5dfeb2cd53ccbe9b4d36865a62cd3dcebb5809d0aff99f03b0dd1ceea1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c4d8f8031d8bcb5d67b5e59c8910b3f60ac997bea584e999b2113971229e166d
MD5 dc54f25065b2661aca96b5394d7dd0a9
BLAKE2b-256 575b17cde087862726cd0bfb17f30bc8907a90cfd1e8f9e201fc353231d93863

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 51cf5c83e6b3d6c4f9066006b68622d8e88089457dd0894fb19d2b8f2892bc1e
MD5 5b12ff3d6d03db8ee0f814ffc5c48a05
BLAKE2b-256 eac368c7541b42c2537daeef4b7277d3fd97755c6c27d596607cb2d428c9edbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5f8a32808c659d60d51cfc8cbe6f332a011e27c9e8f24081a733c74c33e82bda
MD5 a2910c801390d06124a4ed8d170be9cd
BLAKE2b-256 612131efc4f5c86ca252331ecd725ea8404302e3d84713c33237682ee83e81ae

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