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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.11.24-cp310-cp310-musllinux_1_1_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.24-cp310-cp310-macosx_11_0_arm64.whl (793.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.24-cp310-cp310-macosx_10_9_x86_64.whl (859.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.11.24-cp39-cp39-musllinux_1_1_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.24-cp39-cp39-macosx_11_0_arm64.whl (793.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.24-cp39-cp39-macosx_10_9_x86_64.whl (859.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.11.24-cp38-cp38-musllinux_1_1_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.24-cp38-cp38-macosx_11_0_arm64.whl (793.3 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.24-cp38-cp38-macosx_10_9_x86_64.whl (859.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.11.24-cp37-cp37m-musllinux_1_1_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.11.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.11.24-cp37-cp37m-macosx_10_9_x86_64.whl (859.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.11.24.tar.gz
Algorithm Hash digest
SHA256 0a02f4e3db603f8e80c5e2240d5e32dd07959019ad926f9782be7140f3c74669
MD5 55afc100970c6911730a869ee90ab833
BLAKE2b-256 0ab5f9d98882371a3f8d660158e5a4959e36d367398cb86f3f762c5f61e43d81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 85ab297911aaae04e083034523ee998cadde7b545dc8370046ed89c610335dc1
MD5 56958ff2ab3af6e8eff6227ea858128f
BLAKE2b-256 25830c65359d4102893dddaccdb5ce7d7e3c0f17f77bdfc556ed739fcb34e9a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d287cf83e7b79babd5d54d202a26a98531ae3f27ea630fc4339241793cb7ae2c
MD5 018afaad172e43b8a1e2625e07585b0f
BLAKE2b-256 751cb6168e5133cafcef7d8ab7dc01ce7ab6a50d831a22c1cf2b20bd6730784c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58e5d4558ecb82f06c36cf99156a68d0b2fb80a773cd37d60364474315943636
MD5 e345b835ae4ecd90b506720f99d81c8e
BLAKE2b-256 c7326402dbe0a48fbc362e120bfd08775361cde002917aeda15f22fd01f6ac8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 41e82f322df0ccd805650ba58a60c8aed39efb489b4eacb12c05b159b2435b11
MD5 de9436c3a625bdc9e6b91087b1d4f088
BLAKE2b-256 c82f9432b97b3f977e23f6910f180dcff30d09ada23305f1070d6d4bcb9be0af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b69d4bc11fb9dd0d97b26303ab4520605e050bbeef01840240ece722b3532d8c
MD5 f3956ec68e0020362d6aa08b856caae7
BLAKE2b-256 f854cded4a9ab18af98ff57da96f5e8f36c6e9e0d9ebd4b0d548497202a363d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ac4ae97588b32321e6d4d39a089a891e4a9d16123573d9ec7bcd790b54fcbde7
MD5 8d6298893c711a2f9bf45d5931539d6f
BLAKE2b-256 ffc6bc358786ceb7b0a9d147bdba5e95452bb44a34930894562f8ea64741fa3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 163d270abaa60a22ad53df6c6c224ebf512635c54f5fa3852ab57996dfbf7c45
MD5 122cedc065d54e28656bb1066f6eb9cb
BLAKE2b-256 7acd66d4a362dc3310900af578dcc9289d0117d09bd6e7ac84ecbae8e5ba2bc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d69608272270dc49d189dbfa3f5cc09e1b24a7d5fe867a8054a2abe9f90441e1
MD5 de946fa90b0de22127925909aab84362
BLAKE2b-256 685fca8de737b86be1bd6a39fe9cc63f2e76dafb85515649d29879e3ec3c8b29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 982a699221f309ebfcd847abcb27b59b3ccc67994c1e13db118d3d72f78aea6e
MD5 5096f025ea0c74d77fb65f86def33519
BLAKE2b-256 d24bbd1465e61c51834fde52cbcba5f0d16575daa67930713a1544c7c3e02329

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c6d31d35b30f22b847cf5b0393abdf0a213e5f923fb0c547630b1ccc2a2ab50c
MD5 c075a9f3dfe534586d803336772a1abc
BLAKE2b-256 f700d2a220d5754f83476456e1353b3c5969ebaea5882c8e6bc3175a889ff134

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6f66b4efe1dfc23b72686b6278a0ef1d3c56e581c25edba09890c8d8a6802566
MD5 585a8dfa07fc762c4500758d7ed96d21
BLAKE2b-256 ba64c5524532cfafcc710db8c46b32fc884237641439f1587d40a8b3f8dbd7a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d02d58ab16f44f8668ad3f9c9a082ef6581fb792f4b64e2d9af241e693623d62
MD5 3e11ac56611a1e58e1f694ddbbd2353a
BLAKE2b-256 771f1faf183e9f15d713acf7f7c90632300d6d2a0579f13cff338d6a5b904497

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2a168249aa9fd27a7bf94fd96f59881b368d96006cb4233676c139bb53511f29
MD5 a1b1d9e4699def93dff12d32b7002971
BLAKE2b-256 67ed6df5d92d634f202fb2b9c1e78151c6e69e6fd5fa1712e82edb0890885ab1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94cc73257d00448f4c99f5a77dd9f9d1780e687426e0034a23d752b65d01301f
MD5 6ed219506a635ee7a1dfa3df79153843
BLAKE2b-256 fc7ba3aae7188b6959d90281f9f20bd6431d52d774f5d3c58f26c9d8913eca42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3c624d5c77a281173d78ee720138be681b39079cfedd32e75dbf5d9726edc858
MD5 b8a2ef2fe902ff9d391d5c5325fa7f7b
BLAKE2b-256 0a676567ffda8f5f8f935c1de0316d72ae76ffa610fd34ba3257ee56205eb86a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 addbf0ee9b33c67f1eaf579dcd8a882acd078eb3961c822351930f47a9546396
MD5 40f1475e2729e89d0dfd63604a42c2c8
BLAKE2b-256 5e8e19d47ed007161dd7a39b55d66bb06a7f40a3872e221b2caafffe16363ee6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 30364b2b5a40f8c647b52c98e85362749d9cccf273fa0f5ba7794b3ab7914883
MD5 74a5cc9ebfce1eab23e4f12e117d9243
BLAKE2b-256 6e47709e9a25d7bb578bd709f2c9d6ae28a1e1ade7af20ac5d69c2e3b3ddbffd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b28695372eece0d931ff3608eb791b50b9288834a8e9f0c8364de2982a50259
MD5 0f2773a170ba92aeb207fe92d53a2aea
BLAKE2b-256 f01e780409cb161048e69bccf5fbac8fb217eba87ef328e60d00c7e02e229dfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.24-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 23d149a58296bcf1a73a21e23857ce126d4362e4191904b374ba4e8adc41cfdb
MD5 ec3315cefa996f946398c88bcd3607a9
BLAKE2b-256 1ba9e78b37e8f961235d466e29afaaae2f103782acf0e13d9a220a950063c2c1

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