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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2023.8.22-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.22-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.22-cp310-cp310-macosx_11_0_arm64.whl (795.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.22-cp310-cp310-macosx_10_9_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2023.8.22-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.22-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.22-cp39-cp39-macosx_11_0_arm64.whl (795.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.22-cp39-cp39-macosx_10_9_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2023.8.22-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.22-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.22-cp38-cp38-macosx_11_0_arm64.whl (795.4 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.22-cp38-cp38-macosx_10_9_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2023.8.22-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.22-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.22-cp37-cp37m-macosx_10_9_x86_64.whl (862.2 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2023.8.22.tar.gz
Algorithm Hash digest
SHA256 c887c331d22af66899eb96723e30ef2c72a7844a0313c2b7fad5c906104a8176
MD5 2bbf7a7e557fd1df9c2cd86315aea3cc
BLAKE2b-256 dbfce8083c85612b8f169a79268c9b3dc7f32be5c19a1fafc9fc2062ca0a3b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bf5b4648d5f0bc7cde259827e61a435ef36ad624a01c0f6da460988f2d505241
MD5 81eedf483c8730373c8e9ca96d0c8956
BLAKE2b-256 ed6b4920e90399e88bc18a8538677f20449d9a5c533e68f6034be47975ddcfcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d3c570abb74f1fe7007e4d25f8c66ce5b379eed010a4bc1329956e3296914748
MD5 1ccf259acf7e16f1344a13e4785939d2
BLAKE2b-256 50c92c1774a355d477d7ca0be589fbca3635db688f5e10a6a3297bcf65ad8ed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 029e666c57d9d200f89134552784f29b4bb8df1e5e9d47338789de1116ef734b
MD5 202f9c8f1847a37d71a0644cde156b6a
BLAKE2b-256 f54924f66c0c35952c0e2ca20c8658e167cb3e05308134b09844a3aa095bdb0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4992d12f6f4a2ee2f0629754769950e616a3fc5d6990d8da552dd0357db86cf
MD5 478320f2ff44ce379b81afc56e0780df
BLAKE2b-256 8f5b48940b504b180b651d352da6b3d0803652c832453ab8cf64afc051f4526f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c8ba121abb275c090e4641fa62c9486c897a3cc5af74fd51e69f8154456a7023
MD5 4c78453c9e8d2189e045d9898a4fbc35
BLAKE2b-256 57c6c684db5a9f6dc379c8ff2b9f798d7aa53551f4a81244e8b678136d6bfc9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1a865fdabe3f7bdb50e29e40104934a099c03bbff4d8d5b3d21e880f15c2e0a9
MD5 b54a35801d6fbc0f1d92ca91d9b9324c
BLAKE2b-256 fcf407819cb01ec9c750c9c44f9b9f891d85de4d39371cc118bd66651bd3b814

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 93df5e2cdfaffe4d56f6b8d450a01ca95a2dda30fcdd8b70cc6851f695dfa60e
MD5 2c0175f8903231185f1d6609ff8d6c5c
BLAKE2b-256 db2320707fa7b77d9a8309fe4cf9687e6568ea05e9958bc9f70d048dcee01b26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9336776693aabfa3e40ae11fc993739d7af7e27e948d979774cf470d0083296e
MD5 7486df634a01f86a8626f64b6ef90f76
BLAKE2b-256 5ad37132b1313f08fbd5d9f7607d0e8a26d323624cdb668c48955b02df028d9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f8c31bdd1583cc39df56953c8a3e407d82a58036c4013f0de4910c49b5cc156d
MD5 b493db4cbeefcc51b0a2c5b8f4d93753
BLAKE2b-256 efef891280caa68d212b1652e9c069f2ae44aa187890d8bacac6cb11138bbc5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fd6ff80cf647757f09753e41722d78f0d20a7e4cbcdc7965309f9c44417c633c
MD5 af933a52b593f18c467cfcab39e4c81a
BLAKE2b-256 e34bc975ca4badd28ae7b0ae09ffdca57e8a149a5a3e610aeaef2cdcae7ced28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e75ad0dc15ebef012136e6687c70dc235a68f1818cb6a04fe3d7635daa938ce0
MD5 6e93e056649e34e81d942a225f5f027b
BLAKE2b-256 0ca75747e0b34e7f9eaa6bd3b96a1e69e3495c3a437d16b3cb7a11eb954dc265

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 870f3de4645e3ad7e5b66a0fed6ec9cf3be9af051ae7862905bae4e8c48094f2
MD5 78691ec60ad007e4ad90daddc777ec90
BLAKE2b-256 205536fdfaa6975a59dc9a7b20dc6f250c62ea0674a657f1348d158bc9e33ab4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e878c69d9494a6f2801db07002cb2b27203aa39ab5014d822f9f682b1dc6416f
MD5 47e84789ec1e1f4274ad35358648705d
BLAKE2b-256 197c465cda6e63cf3a524d1b02fcd994b348fc6227f64d350a1dc3efdbfdeaa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b530737e6be0b7d8dd893fcc70197d70cee185c66ff527a190e1b36ce841e65
MD5 3f7524f98e306fdf1d8d0b216d186b81
BLAKE2b-256 1116b072dcda9db7e86a5f845cc19790d7ba0985ff6d99b555f544e634274d71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6ea991c327066fab8a027a1e9e801a4cb090bb5485e3df54c7d5161d2ad11da9
MD5 b7cc2667d3a0bca9cd619b73dcaad022
BLAKE2b-256 5312f89a4d9553cffecfb247e983b233bdafc49316721efa299a782aa0a6e1ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2737f83764b8f14213e9b189d282a1843a69e473cb7d0fb602be7fa546d24fab
MD5 c407a9b22c3b88e73788d27365ac4247
BLAKE2b-256 9088aacab3156de781f8502e0806bafae0aba419817621a2b2d0ca37fdaeea0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b6aef7a2b10acbd996968057360c4b096aa84d5f57569946d2bdd86f01a93016
MD5 fa33be293a3c180545d875e9db4c8abd
BLAKE2b-256 d01042d595afa64abd05cbc787b299cf6f81236c0c526ee33eebe9724e496edf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6833a1f714ba7d863f99e8c9cbb6a550eeb883cf24b2a0db1642b13934511178
MD5 f97122a8ba571ab1e8c47f0f6d09b8b7
BLAKE2b-256 c87c74e43d4a90efb239faa96bb33a711984f7152bae1ebb5ee1f505f1c74184

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.22-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8c5f0107741e162ea9e36170ad4f5c5d7c1361f65b1f8dc661403d1ac1197816
MD5 47ca14c9112b3768c88d9376b7f3ef9d
BLAKE2b-256 ef5ace181a25145f2d4d822dce5bd81a52b373af8d47c0a039faf3a45f2383ce

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