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 . --config RelWithDebInfo --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 . --config RelWithDebInfo --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-2024.12.10.tar.gz (161.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cyclonedds_nightly-2024.12.10-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2024.12.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.12.10-cp310-cp310-macosx_11_0_arm64.whl (831.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2024.12.10-cp310-cp310-macosx_10_9_x86_64.whl (906.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

cyclonedds_nightly-2024.12.10-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2024.12.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.12.10-cp39-cp39-macosx_11_0_arm64.whl (831.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2024.12.10-cp39-cp39-macosx_10_9_x86_64.whl (906.4 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

cyclonedds_nightly-2024.12.10-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2024.12.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.12.10-cp38-cp38-macosx_11_0_arm64.whl (831.9 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2024.12.10-cp38-cp38-macosx_10_9_x86_64.whl (906.4 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

cyclonedds_nightly-2024.12.10-cp37-cp37m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2024.12.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.12.10-cp37-cp37m-macosx_10_9_x86_64.whl (906.4 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2024.12.10.tar.gz
  • Upload date:
  • Size: 161.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for cyclonedds-nightly-2024.12.10.tar.gz
Algorithm Hash digest
SHA256 b279ce2040d96702978dbe307885ac9be5f6680e5569e5d638df30e2e1abbf48
MD5 8b534fb217a8a1b311a8638007ffe974
BLAKE2b-256 b6189b204e8f52842fcd2d3f5981bd8ddf8791fa34d08f7c8cb6fb893618a708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c96b725c79f69b6049608c0c175c76bb5fa5e9d32887d1961afac5c555a9a2cb
MD5 4a4bb18948dcf4b01a9819975761f8bf
BLAKE2b-256 66be92c294bbf2276b93440d4169a334f8147e6edbdac6e7adf0970517f02fd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1be8696e854a46bc2c33a75883a39f9a021d0a8d3555e883a60695144dc4be14
MD5 ddc890a4eb7a25d56559411121ed0c1b
BLAKE2b-256 9e0e15c801b5eda769adf4043d4de1960ec3ca7c29ec39ecf54de868678f74a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df94ecf5f093eface2025748873b757bcf749b5dd624f49a84104a90e03d7428
MD5 1116781c4d470169dfde901ba9402d1a
BLAKE2b-256 9d1bb8cc0d04686b740d6804989978fe2cdf352b293137cede2c5fce61755917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d4e6879eb35b835c5212d2b9b07d3432c7beb3cdaea1c122af9fd442b70975a2
MD5 c0d07b26246f72e68568aef9b1e7f644
BLAKE2b-256 5b2d572fee2870a8c91dd900bd0af2cecf92182ef2f7949b83fe74b61fb5b589

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e84d91f6b8aff11f41be9b56727d9a180a0ef80fc983b77c3bfa300c877b37e2
MD5 b218b0833a45aecb0359ee31c21151a6
BLAKE2b-256 5a6dc8ed1b1e5565d716cce78320e2329b2b5d6e252730375bdcb673fdb17093

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fff7141f8bc610b4b7189f8345fdc20509b7393b4b3c834b2edb2d0f073bc122
MD5 9f16d49d1ffa1ab9c2bcd3f289932ce7
BLAKE2b-256 60866f5a3ec78863f8ac8da86d1a6f897cab6bf0f9d832ec7ddd9cac919b351f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c817eec1302a33deb6169fdcf1cacffcba75a85ea873b221fcea2f65419594c2
MD5 c1ec1323c0979f4e0e537ba963aec3d7
BLAKE2b-256 2feb0c72f3363ebd4829bf012d08de573ee2d4ee2876c96f58435515d7f3d5b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a3adb030b36253120a5272ad0b02a397c3de8061ce6a2d6494b90f3ab7ecb6f4
MD5 08a7e13a1406ad598d45c56a557dc80a
BLAKE2b-256 0bcb85e1ed4d0884233f1aeaa594e6b34898cd4ed9e1a3618a9b99d8b631dfdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 32a6d8d6a08c44af222744bf959f047dc1d9707f23bbcb51d05a92a279389f59
MD5 ddaee6dc3757c7200821e2187f98b81f
BLAKE2b-256 e02d59e13b92b960502e8880f77b186eddc223d07d69837e82431502158374a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5996cd2155f0e062daba26c908e23b08749ccd05cac040c2f3caecdb960fbe8
MD5 9e7d81f103f690f5ea4a3bc5a9865b12
BLAKE2b-256 2c0716a50e2b326953e15d429c34c17c1f01caa25c9c42247712e3e9e40cc3da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee793cc728d317e32d916c19a49ac80bccf63c076ea4b232b93994db82c14d10
MD5 6271456e3cf1f2e62f46ecceab740a0c
BLAKE2b-256 4f6fa8d038d009c7694bc542fcacd4c1aa33020b4d3525e91f250c955d1924b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 89761ace400150671faa8bb5e27d0d06e6f0fa09b7b261a7b63b6ce1374e99b5
MD5 38ec86796c4e1f98c9220faf2aee6bf7
BLAKE2b-256 7773e437ca7e7caf72d7afb8046bc98ad9aa831ce33915784f16dc4510ab1312

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 33192b37c23e1bee8c283d64ebd34787cc1d7518c4cf468402c5b54745a7a9ff
MD5 7e9c5bff2c7845a37c3e1e5a908b76fa
BLAKE2b-256 d77da9508fd5b0f5afca4831c7874d7ea3f05d1285382a4d05aa1e284cd7a076

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8a7336536fee8617beb59b7ecde482a6e19350b0d54dcf37d0bd2ffa497f756
MD5 ed20745e8ccd29f4ccbfb03931eb8783
BLAKE2b-256 43724c29f11185ab98ef7692f80796a188dbd012c6fe1d4bbd713f8be2a1569e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.12.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 afd953b827cdd67b557a7d4c3feb3aeabd3916f22d5512ca7c43efe8dd9a1047
MD5 dae5d1f3c039c705c53f5b12c6b27727
BLAKE2b-256 4bd253dd2913e3dfe8addd6c4dee0c8a90fecb8e057bf33280b350eb4150e58d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page