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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2023.8.29-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-2023.8.29-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-2023.8.29-cp310-cp310-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.29-cp310-cp310-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2023.8.29-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-2023.8.29-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-2023.8.29-cp39-cp39-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.29-cp39-cp39-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2023.8.29-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-2023.8.29-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-2023.8.29-cp38-cp38-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.29-cp38-cp38-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2023.8.29-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-2023.8.29-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-2023.8.29-cp37-cp37m-macosx_10_9_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2023.8.29.tar.gz
Algorithm Hash digest
SHA256 9bcdd3b6ef7f9532ff184cf1a34a856746c3b2a06076dc8ce891f9792438685b
MD5 b133292e74550e9828c5a77a10124c77
BLAKE2b-256 b2eb7a0fcee4270165a57e95c837742afdfe857520f58f21cab9f1ee919ff577

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fa2caa525fcdad69d871b8677f37baab0ce9d9b396b1a256542a4b6c98b6a188
MD5 99f1abda15901a766018d80f7823a85b
BLAKE2b-256 695499b9e3cbea87cb6c8f52fb79bdedd0692b5f1d35352c1ee16ac9273031bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 af1464a085cfbf7bfe8dad47d88f1d89a2fa5e3e605d5c5530e238dca7ff4985
MD5 341b394ff5667c43b6fb75887caeed27
BLAKE2b-256 dd0ba8ffb10aa79b5b8ddbb30a09f902a235e3aa90a55448fc618292e0fc346c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c1cd8412449984420b4b0cdfb608dd11f4fbefb1f9c2eb5142f3781807cae60
MD5 c64f8ea6e70779c31bb00b9b47b51710
BLAKE2b-256 2fb4563a2baa6d733fca8add4036b209069300684ea48f7a6d504ce70016b738

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 edc090153189168ff27cae0efc7c80439503555cd05618c3289b4bebcc080525
MD5 261afaadd4822c19ae3528ef6ac0d0e3
BLAKE2b-256 45a725b6dcded87ccb4cb227c06e9c6ec54b73977f3f4a82646567b43d859673

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c64e019c5192312be6fdf26779205ff9e18d170ae34a08518a299d9f7afeb583
MD5 d63fd02fca6d1a37370c05e423d27c86
BLAKE2b-256 dddcfca409b50582284d865e6ce50b0fd745dadd945cf147965ea579f22fe338

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 193ee05d5e6816b022b4de5a48a5353983b7eca674b6633f923f79209c62f058
MD5 e2e970ce9372473b2b0663c93c3b211b
BLAKE2b-256 8b7fe088091d359e65f8fcb2b16e8020921ced73ae438246dba292696bee2dd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4c6f6ed5e48de71e2933ec80c5a5eef1aee122bef34cf392f0108ba99216c1a2
MD5 8e0bf26dc46118e9c4297da591447019
BLAKE2b-256 545ac24c5ee28be3726ed1264f1e352d825d8a1a2fff43ee1604a68647bbb58b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd6023fd32589f115a1feb90b1a71d9e42e7d1669058087386b84119cf19c6e7
MD5 371972c089cc7af89bcb0017e44a598a
BLAKE2b-256 8089dfa13e8f53b84ca667bc219d3e2f5b637b78622de0474f9184de9c075466

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 862d8ae23c008f6bfa36dc578e4083ddd99540448e8b019942ed0bc05910731c
MD5 798b79ca6d346ab559409b810366e84c
BLAKE2b-256 5f87b18c720131c6901a87afce2152b99306417b1aa2c00f26e4660d9bd212e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6c684f35fc7780a07d3d6355bcd4aced9324b0acf1f40f375c158b438c6321b5
MD5 561a89970f77f4affd99d43f712dec8e
BLAKE2b-256 2eface2bc2f7523f8354ce2e2fb4ffb386ad2ef11e4d560c9158e58010f6adf4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9cb0f3e61f76a93f5b5a95aa433cab90b195614893e8d99772a76089ec0a106f
MD5 d69682c8bc36a5f05fc3b29dc9d62707
BLAKE2b-256 20fd8eae675b04fa54395989888f9261764e05a91960e6cef59dfad7a00274c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0ca07c213606d8ab1d0f64ccacaca35d9d5a2d4f9c4849761f87fc0f4988dca0
MD5 796f36c7fe5172d7d94d02f0b9336e2b
BLAKE2b-256 e6dbfe3199a3cc04c6f10d87ca3ef93b93a2f23a4cfc21ad059abc4a381574db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7232343ca6dff07d9222f35f477f12b49c01342a98e547180c953de15a32ba2e
MD5 4656f43a9b991c3d9525693b63eb5d21
BLAKE2b-256 0cf0be1893b81eedb3a17837420203ef3edbc160b984e713e8fdece7897037b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bfe694f0f85e74940e3ec30cea39f1318bebb624ad2f3a810c4f25bb0f2e530d
MD5 e5816a0f980ae4366ae582fa03d916c3
BLAKE2b-256 4bf8d8528c2f9fa1af4aacc5612f2378889c040930396185b9006d2ca4ef4b23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2b955fe5af2f29c988a0d2ffb3ca1659a3069582e927ddcbf62b7b2161f7d9ca
MD5 b59b74772aa26fce1dd73131c87504a8
BLAKE2b-256 60957457cd24b9be22903e4fab1db50cbd5f06b3b9de4d519efdf6f845f77ba5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b1c01b02ff83debda0935b41873ca176ef2e9c411c39db00d396744e4b411305
MD5 ddc3f2d4cc4438c465243ec9f9a9f2c6
BLAKE2b-256 ca2d842ab05cbf2dbae7c1fc2372cd755e0fa768aeaf618ae26bdb9ba45c0e40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 1f54c2294a4bee50dba03a5b02e06001cfe55827a50ea2e13f7b1d29c0c1fb67
MD5 4085b1316b9e137f4dd0184dc64aa0bb
BLAKE2b-256 487c1dc4d8598f2bd81879ec1b87cf33fef1734d30e94f646b44fac83f4a7eb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58faf46589b1b306dd58cfb73fd06f8cd06cbd1a613b5a1442291e80b2339c70
MD5 c89c7ddbb6b54188d9f78e6ead782ddc
BLAKE2b-256 cefa247eaf392d2294a87f3b0049cbbf4fd35bf2dbde10f1fc3b5f488423de74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.29-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ce5500b800dc5d1575199bbbd946e3df6bfcaaf44dee547f6eb14ebb3d28f962
MD5 44af6c4308e427ef23d09b8f26c5f46b
BLAKE2b-256 98c7308386e52043c18d8b29f0603bea8faaf748aacecd67c199e147ee9398d4

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