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-11.0.1.tar.gz (191.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-11.0.1-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

cyclonedds-11.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

cyclonedds-11.0.1-cp313-cp313-macosx_11_0_arm64.whl (855.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cyclonedds-11.0.1-cp313-cp313-macosx_10_13_x86_64.whl (924.9 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

cyclonedds-11.0.1-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

cyclonedds-11.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cyclonedds-11.0.1-cp312-cp312-macosx_11_0_arm64.whl (855.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cyclonedds-11.0.1-cp312-cp312-macosx_10_13_x86_64.whl (924.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

cyclonedds-11.0.1-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

cyclonedds-11.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cyclonedds-11.0.1-cp311-cp311-macosx_11_0_arm64.whl (855.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cyclonedds-11.0.1-cp311-cp311-macosx_10_9_x86_64.whl (925.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

cyclonedds-11.0.1-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds-11.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds-11.0.1-cp310-cp310-macosx_11_0_arm64.whl (855.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds-11.0.1-cp310-cp310-macosx_10_9_x86_64.whl (925.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file cyclonedds-11.0.1.tar.gz.

File metadata

  • Download URL: cyclonedds-11.0.1.tar.gz
  • Upload date:
  • Size: 191.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for cyclonedds-11.0.1.tar.gz
Algorithm Hash digest
SHA256 487cdd9e3dbe3bc6f66c3318c45979f4015bb9d32d5dfcb9bb4a67376176a526
MD5 1d5a949cd9552b24d874c0bfbbc0ebee
BLAKE2b-256 8352f501db026eff5aed63598c51b58a09ee45cf90306791cbf7c05f1a30ebf9

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 850d6624dad8c9f3e0e65423225bd8e4c14c85c2d53bd64e16c2569ea3b491db
MD5 5cfb52264e7ea6d20bc6cd1b3d4037aa
BLAKE2b-256 d3fbdf46b2aeff2e07716c0659bae2f5ac67bdd33e7ad4cce1cc35c505a0aa90

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fef1f6ce115a579e322f3156842e8b660883e4e8b0aa2f5e2a3df9d7959d1736
MD5 3b05fc0a76cb19c31affab1e2c2c1afd
BLAKE2b-256 eba5a6c8052dafd16c8c0e02eb6ef0cb2bb086d726d654c56e94ec4cdb1640ab

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3b899649685fd2606ea65620ea173b28d61e775adf8785861460ff91efbbbb8
MD5 5b2d38dd59183917878c44a8145789d8
BLAKE2b-256 f728f6f660f62f459532723c25a69e577694e01a44686aa20a5a2053ec67a402

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 20b5f2b4c1e42bf3d217f45ba3664dc21a16b74803b8b457e91ea187b11fc7bd
MD5 cd441e12aa52f2ff024f61091f15cb86
BLAKE2b-256 8a4056f1dd62cf7272e78c3c3f5885e7eec1a99f923dea9522208c0849a816bc

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 db977a7306f85e5b83cacfa0137a26955c9fe1d6ad03621407e00005adc01ede
MD5 0cccec7ef04fd70d7ace79119e53009c
BLAKE2b-256 f29e966e6f25650b65726361eac161e71cca998c653ae39a0118bc5f94356d0e

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e96507088c57165f7c189c3a85be866f74c7449fb0cbc6316ad306e5f599be1
MD5 d3ecb216bef27ccc565b9359f47a09f9
BLAKE2b-256 5a2726dafd6cde19a440497c26d3fd39560db2e5ec2261fa628801000a0cd8b6

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e74b7daf503a63b37765e5d8e2808db641d1fc53637004a04636cf564864ba16
MD5 4684ead7ec8c126ab7f885dc8bb31c24
BLAKE2b-256 9d19d6d7a3ff4738ecbd74d6c634776ac665f7a41d68230f01a11d4756490608

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 60d86cfbb06dcbac1167ad1dd6eea7fa62e1adcc09132c7e27d1641fe8e2790d
MD5 ff1f8fdf6fa9eb6e11eb99d4f9aaf4fa
BLAKE2b-256 2dbfb779a39d4415e630ca5af5eb2143ff13b396c8d35cfd5ef8b36aa51f9579

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6079bf42cfe1f201356b18e093a3c6a57983b96a7c70c359723457df399b7ed5
MD5 c27eb4ac2e64a205682f5f04d4692be4
BLAKE2b-256 410be697fa5d3a7c8f43696e76a3f82cefef2fa13452f840bb506128cf5be167

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dce635041d42e954a5fec187dabf99d4b36c9daa54cc97d6d2238985e3ef6101
MD5 1587f2d896d3188c04330f91c5514925
BLAKE2b-256 b7010295bc331924c147a5f13deb30dff21b1d006059eac6828cf74377c716bd

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0a3a3db3245749a1e4934bfca21ebaa3fd79d62dcbd5961a42011ce74affcd1
MD5 fefb523bb041157763e2c4a12dac5fe6
BLAKE2b-256 695890bed244b4a20619dafeda12091e3020537296a1536776d58d3ba8bd0b9b

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0f883d834d8cf62416e83d878716d7d80d26b8356cc0678aaf1363f65102a99d
MD5 7fc3614ae14a911829ef5f4ace66e1b9
BLAKE2b-256 341ff4d2e1ac127f841d24f4b494b15e8133ce2b7b54126519a1ab605b546468

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 da589d57bca29189c1b36be0419bc01e883d3649e906c8d1f0feef4a472cc412
MD5 781e288f34cf38051518d82cfdc253d9
BLAKE2b-256 42533085e85e11728e56d2d8e1114d03d29674f9b9250af5350b66b0fc378752

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9eaa0e08ea41206b495f36fa4c008ff89113f78a39e54f4a17793d9a68e7b978
MD5 ebaef8637c9f157d86f7ecb1826f8ddc
BLAKE2b-256 40e84f05e7c13fdd7f7c552dab21f8e99fe12153cc3e6ff35238968b24f2019f

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83777f464f77481e2334e0c2df1d6d41029a09afdb2e604bc3722c69838a8418
MD5 2bb062ead1f41936b3a62d3017dde919
BLAKE2b-256 2c2642808458d2c29c522b4a1aad8595ebd75701c4c6a5d4d69eed6654e011ca

See more details on using hashes here.

File details

Details for the file cyclonedds-11.0.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cyclonedds-11.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a79bf83957262c24321e22455e32fc689370cdb7c9fb4c8712aa9a06919f38de
MD5 e18168dc033b71fb99ff0ea4ebd20c29
BLAKE2b-256 bf08e1a580824b202f85cacc29669936906556ca8c98562001a549dcda16be6a

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