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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.5-cp310-cp310-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.5-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.9.5-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.5-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.9.5-cp37-cp37m-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2023.9.5-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.9.5-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.9.5-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.9.5.tar.gz.

File metadata

  • Download URL: cyclonedds-nightly-2023.9.5.tar.gz
  • Upload date:
  • Size: 160.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for cyclonedds-nightly-2023.9.5.tar.gz
Algorithm Hash digest
SHA256 115e244a430547e23e0dae8f6af870761f882a7d31302678dbe6eb1235185182
MD5 26b90c2df61fee04dc0089dde58532bb
BLAKE2b-256 4548ac634b58174922515a3e8f17a8a4e8407e9624053c33c0b1a2f4c8484935

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5f5dd7780f0d42203601cb6045f9b7b3750f7b5f986726716d158aaa6e2105ac
MD5 34ad28bee17eb33436da72a5c1fc4bc6
BLAKE2b-256 07e7fa3889db7ddaa0558043b2cc58207273aaf111aa3258ed3b202a97bd11aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 bbbf098607baf96903d3031e7b0935635c3af50154b3eca8c0ee46c17a1722b8
MD5 24daa5610defe5b51fcb06e58e771be3
BLAKE2b-256 4455a931e00a5a2652e7eebcb8b9698125a08e53bd410f8211e7da75df9ae14d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0d8534e326b0592184222f6ff02de74073108d7e7eeee0238842ed20f009615a
MD5 8623158ddac74aab13107cf9fbbb6574
BLAKE2b-256 2319f44f24ad45a6d0b4e2307858b8b8e93bae5ae82d194ad7301d4f62897803

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8765bdd771f3c91766da4332c740164e4ce69bc5fd4bcc9e30c2627687791a64
MD5 997c924cb6af53c4854e70e5d2cb6701
BLAKE2b-256 5e6c2fd398014f587aa542594687875466b83db3f6e058cf18ca7c89c0e86708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0b8b7d09395ff1fc6caf4c342134dde97ff33e423b271b762bd3dd62ed6ee061
MD5 b34ab0daf03aaf99e7ed1aa6491c5f42
BLAKE2b-256 4c4e8ec3a2273ffa3a759566d29bba13874512975c258854873f87cfc3bc53aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 68465ed143b15905b15e6e0db7fbb7b5804039708c3ed05e4053649d530cde39
MD5 77dc93fd9272077754e53bc4f505e654
BLAKE2b-256 71f5a93cce30ac99b6f2b0628094572834a3dfe289422481169f5a7e5bd5f1e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d61e4cf98d62c23acf07ec343497b7f3ad1fa170e7ae7e800ef481518e38580c
MD5 a95960abf0a7446afc7b750a5c16616d
BLAKE2b-256 a6fde7c8e6022d3271fdb5b7510147aad7ecb40a23589583f3de515ffb26151c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 52c8f18ea6294ea1df07e2ec134fb1a90cdb3885153fe0b6481cc9119fe5d321
MD5 609a911931e8bf0d8acfd778c9dd4457
BLAKE2b-256 59304f58f027d17bfa1c6ac87c7db02736ecaf66120b6d6c5f0f3ab4c6cd11e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df786ac28d271234bd87a9cc955a64a4bfefda5524fb228ffd7266cde13b5e91
MD5 e3728320144eac87786671188af924ec
BLAKE2b-256 eb6768dc67299b131f036cf0f953bf9931384dd2deef12a35d12800dca70e2a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7795437c2513ebfb148ffbba62e41088d69f71bf93de37f9ec69169fb6bf8efd
MD5 371d4158b94bb8c8cef9c9adef1fd64c
BLAKE2b-256 aa011f01399112038b998954a76f20a0c65c2e80f1e6ca45a9da6a9f39f54d3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3941680c0d75026fbf358984c71cd35107fb8c17e9a7878db0de0359d0f33f38
MD5 eca409a37f80b99b4cc951d96cfddc9c
BLAKE2b-256 0a3f12375b2d3088ba2bbb4eb72a6ab64bbf9f9068d9387127892a0e05ff2b7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 9f38474290a34bae8f91f0964472c31d5a91c4120f180a685b7725a6283e56e7
MD5 397a56cc2bf92cf3224c279b5c47ab9d
BLAKE2b-256 7ab139aaaacfc8128c33ead83accefcb165dcf561476862fb8398f4a5e1d7500

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 634afe303a1fe5087d874b6add9968ae068420d4e079e630d9d439ebdf1bf73d
MD5 3aea2ead40b58f6a1887cb50407d1a68
BLAKE2b-256 1a2cb9e6be3c6be747f28b48028e8ac30665945940421e2eea7a38aa447a6df5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d127cd4d91bf4ef813e999ee84be8eb012b169abb07e21d1e63a786995affcc4
MD5 5248d564865bb1fb917b3b01079cd2f7
BLAKE2b-256 3c7d0691cab3c8dbd83302ae78b916a84dc9ea4e05b4c95c12909edb5553c426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4314f885550e793bf05bfcbcd80e0cdd94f2da8d234831a06be5c50e16fb5c4b
MD5 0deba0bc2ab8594586b2fed513de3f99
BLAKE2b-256 f3d3a1e02117c13ff26a6e67be29436c357eb97c0a4ef271fb5e91effc3b7e5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a5de0a6a39f8a2b5061dc886de7fd713bc2d384c71c814522f04e3e6562a250f
MD5 fe95a491773514c1a93985b3b5268345
BLAKE2b-256 1fb3856052553d0e31cc14b88a56f5e9e5a391bce8c8831422adf452daffb960

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7b6a7c422e7d0168b7019ae84da3db8c5851ce9554df1ec3eb5c6d7163f7af28
MD5 23c819e5da22ac30ee857911ffb076d2
BLAKE2b-256 abfb3211dee5c353823a40b7521aa5e20a5ecd8d57707acba1fa1bc8fe716c76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30f4248c7f60b16aae3e1ceda9e1adb3451d4a820521e41795b8882a7861383a
MD5 71e943781a8d156db8ab4b17be51ff6f
BLAKE2b-256 af98807d31fda4067ac18d77de8d78845a2bce3df47e5ac83f94b46501c71083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c26e85bb91d2f677d5776259c2d697c554641d9a0236e35df0cb792c231cfb77
MD5 495744d7e83c6971c5de3ae96e4928f9
BLAKE2b-256 f491f0980b5a62f8e94cdf44da7cfc927aa9ebbf9d2de39a0c677dc17ef60834

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