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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.24-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.24-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.24-cp39-cp39-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2023.8.24-cp38-cp38-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2023.8.24-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.24-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.24-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.24.tar.gz.

File metadata

File hashes

Hashes for cyclonedds-nightly-2023.8.24.tar.gz
Algorithm Hash digest
SHA256 9925117703f7069c1686c76d0498e871df09d595aa88499831c1532fb5c8ddea
MD5 24bbcce426a1bfdd13e006cee9c9145b
BLAKE2b-256 a9fc98cffb8e97bc8268be796a898dab50e08c5d9358004ef3c4c86ec9b8408b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3221c3462eead448c04f7b8e4b48af4e7bf3f06465654f430190441e5f749629
MD5 b90cc9b2128b2fcea8093af5b080c074
BLAKE2b-256 ed9f980b4c33f70e9e8d47106919567fe0d7045d351b94bece54396164b82b94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2845167293a46cb8e1a02820e1d6930bd2612cefafadb1ad2025e88de7745132
MD5 ca79325339aa53706338ccd28f8e5a23
BLAKE2b-256 9183be45b005e6acaf01bdb696e182cc79949150f34f2694402a8a6a07812331

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d55377c1aecd1c7f0b3569dc1e2a5791a986397229283aa9fda50aa025ef60d1
MD5 c3acb2996e3a2d6dd45cc6d016410111
BLAKE2b-256 ba10f32be2f41293ce0850c75ac5611ae36622b616ee29a99fdc89100add29d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b36378bebf317bbb892910914c887a364e0a501dc504a86796435801dd1a26e
MD5 6f3ff73ce241f6636523bbfbfa4fe6fa
BLAKE2b-256 98f2f79d0a64299573ea1b85009113989dcef288ae7d750d1c243165e735f3ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dad944d7f7f433355799f12a16d7cfc9a69b0bca0aae503e3c5f25151111a920
MD5 9d8270035f7dc955377b13cf0950b8c0
BLAKE2b-256 8266a318de9707fe904b69daa036ef60c485d1c9fa886dd76ae0d1a00ffe0dff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7dbe44b4f923537a1cd5d1f96b64560f912fcfa9064ed1b0fc645fab865deef9
MD5 12d5c80593ead49911cb559016164377
BLAKE2b-256 01d8d61199861f8266d033a0be612c4b2d93dd63a82d585b9c7597a137b188ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0e3285b1186e69267456bee57b65a23f94d3bfcea979c8adece54a75724ddfce
MD5 3ef2810333463c9d73e4fd7cab6de1ea
BLAKE2b-256 70ff400de58debda524bb7487519a36c03eab444cfb8678c376f0473340e2022

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30f8cee727874e25f118c93b8377482293dc274c2b9834f844c7fbf50c01415c
MD5 1255b31ff3f970368fc342271ee23bdd
BLAKE2b-256 99b604c31d8a451a91d3a59c42db8ad67bfc1c4c643ad36b88ba94ae101f1ad4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca87dc62c3d3793c86646385f1808eff85fe1eff8d25f22ddadd9c87394bc7f6
MD5 30c3fd9726251f642a539bd1b9d987b8
BLAKE2b-256 3f750e4b922618d3ae741458c7317c679f4f47ad71b373eb1628bf98e606851c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6ffe78b0db8be87e98cce2ff82bef468069f57974f1600ee80504d49166020c5
MD5 836c273c4d9ee1b1aea084cbd807838a
BLAKE2b-256 5ee9b993e9439e3bd3e6f08de0ff365ca6e2567b1e88c25a52112079f66fd58b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 02b735310c817408d5538b91ba65bca309086b5b122a9c639cdfde3d53939085
MD5 c957e3df9bc2b0034e0543ed0be900f5
BLAKE2b-256 a318b7942a74972d41a8a85b12dd3493ccf9270229349b190ab53c8bf9ab28a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6fe0de3f750bc75c20bba733227da88f5e437223d9d1ee23c7cfc6339888181d
MD5 316e1a7db4c0dd29732a22ad65f3a7f1
BLAKE2b-256 730853b77ffcfe8a2535cf5fc71fe47341752a258ed727aa0de56a18060535c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8dae428078395ce644e28a4b08f4f0728c42ce5c5c95769371d189a937c05b1b
MD5 52d963dde0b82244140a8c047fa35ab6
BLAKE2b-256 8fde7a7e7c6ed7b0854bc88b13b52760f47ae4836d585b854f17184dcbbb5ab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1808a2ad5e4c0cc015efd247b3c0e9fc01479212a09e9f57496f670365c045c3
MD5 fd3062ee28189fee8c6ddd6e337d7f35
BLAKE2b-256 63e62e87e38131a9a6466ef65a0950508b11353e95d4f2da70119433846fe394

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 48ffab06b75ee9ee17651fe6f71245714ab5cd3724796f8e0faf9afeeb2d88b5
MD5 8f7f39d78230e210cd95ab69974669d9
BLAKE2b-256 b0ea990b576ed5f13f270f82de83c4e3b7c9293e348b26c20190435108e351ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e0fc98b5149ad09e5ea0dfcaccfec51c386192387599017e1116e6aac3f43790
MD5 716db5c7b3d634a950ee8aab5d251fc4
BLAKE2b-256 544b06090414e3fc3626c39744ec351dce4a0d5a55db492adf62c80b20a71958

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 cc35bb6f0cb7b7ec084462928ff0ef867513e7996c8562d3a5a97053e889d62f
MD5 d5289dd5950ff5bf1be1929239f2680c
BLAKE2b-256 bc83644865459f63c6e9789cf25030d14d997991d997637e4d9b0a0673ceee7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f50950e63e64b48f016d452f97b395dace4d2221ff892f40b6f1ab2aa7b03f0b
MD5 972039a1f6d072d6f28dec361756fa7b
BLAKE2b-256 5d3712d27c6596273f2905eff249c65bbddb1dbfa6bb80cb74c8bb16c97b261a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.8.24-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 66ff1b4208795c7dc31a8e5e8a242b8ca848692e4e8db8796c8cc208f4aca8f6
MD5 4f8234ac49d59ee343ea8de77a32efb5
BLAKE2b-256 8c0f3e71c6a112e8225dae3a5e8748be1219c5a541307213439c3ddbf9b9b07c

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