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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.11.23-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.11.23-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.11.23-cp310-cp310-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.23-cp310-cp310-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.11.23-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.11.23-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.11.23-cp39-cp39-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.23-cp39-cp39-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.11.23-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.11.23-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.11.23-cp38-cp38-macosx_11_0_arm64.whl (792.3 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.11.23-cp38-cp38-macosx_10_9_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.11.23-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.11.23-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.11.23-cp37-cp37m-macosx_10_9_x86_64.whl (858.6 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.11.23.tar.gz
Algorithm Hash digest
SHA256 6810d26768b7cc29e97e8bc9218753add12fa19220a5f24362875f133892a985
MD5 953d236e44e6298f9f4ef4a6469dea78
BLAKE2b-256 964fac53202bf68b0eb10ac0e7e31f0defc9cbaee95e48dff5c36295f8483724

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3324b606fefca1f50e9d025c2e827d615686ceb68f6d04ce395fab8ad35a76cd
MD5 be213d3fb2515214ba7f774c3f5e310e
BLAKE2b-256 75ba2deb2d77b6b67c42244f660bbca1d0ae7807f75db68bac3d19f82fdb8b85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 258b8f2fe43f669786ef4b03e1a9e3872caa6bd549c0e09f78e5ed648bf00bc9
MD5 cd5611f7b63cf38f01858f5f95f32c9f
BLAKE2b-256 a463e96afda507978d3a2a6b15484cdb0b011572760b63c20c9302f41f1e2148

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f62b180176b132ae2ab4034852479eb4d48f65e1174791962b1cb3f1baef0c50
MD5 616956aaaae87f0720d08108cac580d8
BLAKE2b-256 0c83b6ea9d96bd7d17d897e6489e86b5c891abe30d8a9abac4bf3cb261c0bdce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4854707424aad1d660b4044adb9c8a6d0b1736a0dcab7a7e19245912d0451e5c
MD5 ebc67cd72a261c92baffff42fb713744
BLAKE2b-256 af98c0fb922019a2cb9e76b6a1f9d97724149cc928ed96a27fba2dc4ac07e6d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 49a211503915301929f78b80a8a1ca5af1de368a6dd227c3e535d80868db2113
MD5 af263c57a9bb3e6669667c0062835df3
BLAKE2b-256 100118f442189cb11bc4bc87149fc52d5e5e47c72f8f1f6ff5a6564888442ea8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d23ba4b79bc77da6ca4b527349ee2230cc9751e199175e916cc3e1e27a258208
MD5 28bf033b4b329e2693b85704a7571d60
BLAKE2b-256 6e2cd63d239fc4633ba8e869e1ec9f67784c371129d1640d92c8043bd2efee5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 75de548b6af8d8e6aecea46ab9e9ffd4a9693e9c0278805d4d136fdd061abebd
MD5 a247fedb63aef31de4bdf1942611fb0e
BLAKE2b-256 9b8771023a81f4acf7f957a5c5c66970eb2da4d9a8506afc765be2ceaff02844

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e66d567e4257b11646a9a57e1b59a95ffcc4f865fd03b28608b00ea27a960cd4
MD5 5b058634c75874d0a6d2f97c5d6326c8
BLAKE2b-256 a303ec22cbe3301ef7a61831b5dd35998c9b8e0eca6b07c035cf435bd7469039

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93d1e498ade7326f90d1cf3b943842af75ce21f93fd3b598d5d8fe897d2f4bc5
MD5 dfbc9cb3ae45ac996e4aaf10e02f7341
BLAKE2b-256 f2e9ac33c32a68f4a66182609656032485ef9f3a7da5d98311a0978af4ca7db1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a199c40709533db4cc67482196f86728e0c114b509d40d6c7acd4271e06d40fd
MD5 321c2cdfd9de5fb5fb4a3cf27e737a45
BLAKE2b-256 7f9155664ef3113f8d70beb07cce0aec56bd0958f147e01b2ad5f0f50b7cc896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fe64f74e2e52932d7e202c37f2fdccc73f44eaf88ac5e72143d0ee8081aa1e9a
MD5 c0737cf872d86c67dfe109ad65d7baca
BLAKE2b-256 cc82441c1439c2b620ec6b5f86e25add52be4afc1164bdef98a1a4d481cdc0d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 43d8c51056ae1c79895624e46d21ef2427701b80ef8799045f3cdf5221957912
MD5 d028b28a9b14175d3142693df9c4b6eb
BLAKE2b-256 625dada509f2f0678fd6d614f6280bb1f2b540098d363ecf319c4d7dbfa6f1b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e6253f72d437724a70a274772c90375935d33c428c922ed5fbcc72d2ae3cb03
MD5 25f071763187b3c54bb5645976c364da
BLAKE2b-256 73c460ae9641a4bffa28d39964f80d47c604920a3d3651ea55159521f7139061

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c2928176035ad848aa12efc756e91bebff7befee1b8fb92954281e865441e008
MD5 fd67d4a781655087c36d40d4823ea256
BLAKE2b-256 fcc460f2bdb2951dfd77f63a7996d5fa5d6407db9f18fbca25bd7b988ab83a9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 efd84a03171c10bc4d303a7e54c8e2817066eca9271307e9790a1dc3845f1126
MD5 2e77e7bc45365fbd706575fe470a95e1
BLAKE2b-256 51a1d1d8e2d4d8a24d832b62dfb6962e003ff993dc99b07f2e5334e3647532b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 56ccf527348c195fe7ba307841ae39d54bd908c4eb09eb4b18f7499a40bac35e
MD5 56d85ed7f6892b9abed1bf46c43f1241
BLAKE2b-256 f0c99773dffd4f11f162138798166453d66361a5f5dca87ae249be736d723061

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b8d55c75aed6180ad52436ea8c03b05d00c645621d3191884a30915d4061ce1e
MD5 b45cb5bd29444ef7f52f9e4af997fb47
BLAKE2b-256 5ef81875a1444875205362048f08dda2b3e7732162314512992e261c773a6254

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5c7ae5c17bbb475d2ffef2504fcfe4f7ba11b0b2cb27bf952cff68e09799c2d
MD5 29479af00ec6b187df731f69c4255965
BLAKE2b-256 d936d90230a9d186a7b24737186e96a0d8f6d7a86c1be7e1cf2c7cca6584629f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.11.23-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7945dfb2c856663bdaa9d37ec05797300d0d1ecf8bd03fd205c1ff485bc9dd01
MD5 71ad858ab4155cf0314792a215b6f67a
BLAKE2b-256 b091206df988a9166ee867d744bc55286d5c27edc4ebc7db3fb2eccb4adb67e3

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