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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.8-cp310-cp310-macosx_10_9_x86_64.whl (856.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.8-cp39-cp39-macosx_10_9_x86_64.whl (856.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.8-cp38-cp38-macosx_10_9_x86_64.whl (856.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.10.8.tar.gz
Algorithm Hash digest
SHA256 e67efea0e82101fe259d7817191b9f43a4898bf749072df72ca46015aad9dbb6
MD5 df81f05fd32a43a5d927b19819d9d828
BLAKE2b-256 5a54d8b184051cf384c2052517da9a8c10d3e12197382be977c4d12b1685fccb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d5f70a9095fc05024fc80a1daf78d24b2153109002335f81e6b0a6da5e4e420
MD5 1b8b83e725740491ad2df9eb3d059cc0
BLAKE2b-256 187f5be51149bfe2fadbcf94ee78e5a860703223de0a6aea1cf26c0b4e6f9d7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fab0aeadb18d4c85f3da5facfbe2bcf3e02f273cec0993558b37f73c09b240cd
MD5 c14ec6d74d1999365d6e2a273129e7c2
BLAKE2b-256 a2331b13c5353974131022ee100a4ed452cc87d37ca92135bbd01646922c3870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67952d0912fde444afcf1a3b23718cb4b73cfa42e79d56ed969cf11c79cc3051
MD5 fafe35e37cfd06a39f58e1386656f910
BLAKE2b-256 92530e14c91c2d317b3cc2795ac14b749d8c423a3e0c48f0e76b106164227c72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 524ebc1fce24a0ea3cec3380f5c3cd8cf2a3e005a8c90c25bc00427a7ac02ee5
MD5 c39288cc14d1776865a186cb1ba77ad1
BLAKE2b-256 5a0d6b0f388e449e1968cf4fc8918b70f3d409c9aabde2e3a600a1cccfdbcbdc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 727b1fee721c77dec399133f226737d2744f005d5352c449e484b79ad28d7828
MD5 81da230de483f73de54296f04073ed7c
BLAKE2b-256 ac8d831bbc28be85d86cb76203dd7b7b22b9d58525a91afd34741fd9f3d25d60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 62ca6169e675d1b3d26f91558d4273b73bf750a91d1126beebcc39fc5f1a1c4c
MD5 726501b7849985b5bfa34fe3392b8cb0
BLAKE2b-256 ce81f512908e4fc1ad588407b1b6a7a2f69e607fb1af540d3238005586bda85c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 de5fc15ebbdf4049ea905242cc3c8f7086cc0640c7acfb614ed85f04266b7e68
MD5 bf3bb8ef10b4df611f63cfe0ab66c05a
BLAKE2b-256 1b33eb3414c9019630563cbdb93482669bfea0d1576aedf2e8b93d23fc340778

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f580dbb68352ba309ce8feecee92e9a95f86c7c7b13402e8b43a9e19f716a5ad
MD5 b10e0e66aa055216e5a8ec71e2e3dd3d
BLAKE2b-256 65cbe84ee23bf0af094a3a86df5c6367d31526ab4914e4ccb0fecd0ceaf2074e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 264923e316a023467413cf5639300673bc15869a02fec380e5943be77e2f33ba
MD5 cd5cfbde89f386fd48d5a930541a3b5c
BLAKE2b-256 fd1d3402fd78a99f9a64452c328cc6f48495a01394a3df0d905b8c23d451e62e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f6e38b0ef4158089cacb374c7623c5ad1cf63b42ca620c9904c74bbe1d18dd47
MD5 abfa12edcf3e5b9a93764bd203fbc41f
BLAKE2b-256 7cc5522f9560600f61b3d424220384bec001a26d259182805e55fe1e21551df0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d8e02a8c5dfd9bf1195e1204229f42de82865f03aba522bda2ddc84e7f2b1db3
MD5 32536e564dad28cdd97c854281d7e352
BLAKE2b-256 90510ef52220d8fb42e97d1d726e64cbc6be9ba5927c3da25de8f924b6a309f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f2561421bc1aca017849557d1c2bcb3f0ce5a32b8acb50010630b3887237968b
MD5 2c88fe2d7cd53595ca5866a97bca1fbe
BLAKE2b-256 c8fbbf43075dda58de8e63370ae98d12bc634d80ed71313122d6ff8c44c80bd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32ca3e8b5a29ee0612653a4c78151f6c020730298b36f540d2671b91d68054a3
MD5 776149ee79fdec95bc9bc527bdd22b29
BLAKE2b-256 e8d699fb43ecddba6f7e69cc0f8d96057dccc103adc155c59ef292ecfea83840

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14dbe2b2c44ba449d6ee747d25c27b4fa9b7268c778781fd17aee2c1cb7e9fe2
MD5 79c0a018623174256be72b7698ed1684
BLAKE2b-256 b5584850c6fa568d71d3756c6481f05a344d11dd66aaa5830e0fb978a3ca0f98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 78b5872e7536966e4ebb5451be1ab8025a5b12c2c21808c3303d8fe937740045
MD5 939c7575ef12ee7872357f8aceb74281
BLAKE2b-256 75cacdf3c0dc1e971f7da455575dae7a4e835127d9ea230523806c52c56e86af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3fd940b32f90e37add1ff2ebafa136868da8b1ae4413e34a58d012269b2b73c2
MD5 c669a7c65e9605580e43e4491d74e1b1
BLAKE2b-256 26bfffcc83c5792e4fd1b9b69ac5073bb43ea8c58c5eb577c076e5ec6c09f0ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 234efbb9aa431a524896febc0a460f1fb23b2fc04adbebcc1caa8690d8b2e8ae
MD5 cd8a89bd96111dca17b0387eb5e169fc
BLAKE2b-256 2acc2247337c60e983ad80ad9ab754e168c9b60cb7fd05cc4a2e2d71d3ad800a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 71391b1b1eb2e213385647f255cc8111c6f8a6e5079fad0d21d3200a2051c35d
MD5 1d5cb68628492985b8db356ac7363e6a
BLAKE2b-256 9f00846f7ca303d3f5af0da273c753a67d8cb598b7a34247fddc62fc10191991

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c88b3911ba971641c3ac5f3c9fedc6ea68a28b4c45a79f6bc36f661f28504966
MD5 5ac11212fb43955deb4c32a7f862e238
BLAKE2b-256 d07fe7c7909bbc9e0fa292bc68be7f23fb8304cc27e91ac480b5e64996751a38

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