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

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 performance

cyclonedds performance --help

The cyclonedds subcommand is a nicer frontend to ddsperf with four modes: publish, subscribe, ping and pong. The below performance run example is the 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.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.8.10-cp310-cp310-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.10-cp310-cp310-macosx_11_0_arm64.whl (801.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.10-cp310-cp310-macosx_10_9_x86_64.whl (867.6 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.8.10-cp39-cp39-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.10-cp39-cp39-macosx_11_0_arm64.whl (801.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.10-cp39-cp39-macosx_10_9_x86_64.whl (867.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.8.10-cp38-cp38-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.10-cp38-cp38-macosx_11_0_arm64.whl (801.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.10-cp38-cp38-macosx_10_9_x86_64.whl (867.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.8.10-cp37-cp37m-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.10-cp37-cp37m-macosx_10_9_x86_64.whl (867.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.8.10.tar.gz
Algorithm Hash digest
SHA256 0aa63ae69e1d05d1429bbf6389052934ece76d9338aba6db675f462e503ae918
MD5 b7ccc6642639f31ee870cea5ad07a0ea
BLAKE2b-256 d37432adf79d49e7f45ee6922d1135a82187da114d2b09cff7b08697213b7800

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 11f100fcaadf3b84d6ff7c61909b05babf98893a3613826906d633c6e1520424
MD5 8b328ddb2e996a0e94bd9287801f7bb1
BLAKE2b-256 da16ffa697c200c46a0d6be75952ad509421a726f3f68c7ae7d9d68dcba0568f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 7e49fcd739b0fc2f2ba976e2370b2d14dbdbaca0168be9a4a6b307b95d2bca4b
MD5 044988801f5e29167681247328e8bc38
BLAKE2b-256 bfdbedbe25b5f250430a01f02f52f51c910af9db9f82701de1c1fb1fc177c65e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea1cab93b54063ee27298aecb6d11a5d8686de3b11138c54b166600ba7f6cc95
MD5 a8131e5a3c8c8b274de8b9fd6ee7a6c9
BLAKE2b-256 fcc58d172e705f2303087351763a425d8c68e77818598bd61087940ead9aa038

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e19824ff4f52e0527c802cddaa1032c536812de5074886ae9b896bed83fe9b7e
MD5 51d45b502db29f7a88ad8ae1c93f3578
BLAKE2b-256 4cc1f2f64cd9f7402cb288140a0a822914929f671dc41949806516e5996448f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b2f1485c6c6ef503e4e91007e2fea0d11ce5e71fc7ff4199bf1954f49c044e95
MD5 46dd71b46d32d4dd1f10f9bb94d1581d
BLAKE2b-256 8b2f7f4ab7b532101b597361e6deeba550677943d2fcbd743124c33d985af020

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 54d08d0de22119149938d7e768a8974a0fd765c3835269e8d4313c631221412b
MD5 196a9e5f9a09ea7438641503e8d1902c
BLAKE2b-256 1cdb5e9ade8badff59bf6d7aa3f539437f872a01efdd0f1b3ead912cbf37a6e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0a63fa20e08e8c85a6bb98a974fb8cfbeee7b0b3c1c45757f5b36ed1ee67160a
MD5 e697b3d4635deb6af72fd71b4e3704f0
BLAKE2b-256 33ac33cc676abcc7692da718eacf0b36ece79e477e7619a354bd4772d571cc36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0c9aa56ee5f3b4ead3758e6d59ee6488602f69822a5e29badca59b11a259430
MD5 c9c7692fc84def737270ef0b28af61e4
BLAKE2b-256 744c355e87361783b79ddc631eda6029f3800ee9311368169dbe620abd1a8a3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bf8bf9a2a03f1a3bc0cf4dc1b806ddbc33eb16d3508b11c931815a4a0aedfe4
MD5 86fe83dfee4a395e906fa421d2aa46fc
BLAKE2b-256 b6da62acd808db12636a420e8a73f123c41bc3ce49c1d4925dc03d22a6615a66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1ef583723c8fe11f12f89fc4dc82249e0c35a8bc596eeaa35abf4b8aa5469734
MD5 8f9e25dcee153265b0ad4013defae0a2
BLAKE2b-256 d092ad80f096ef9792dd2ce72c31fbe63482b3b7c066282ab68e60346ba4f53f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 56a399f3e2a18e64c4d9a93016448191865c977ed0db3427b5a658de5c126787
MD5 b9fd487ffb1bfe9cfa9e118a9520c10f
BLAKE2b-256 02acf4ea6f58161f1f138d223f4731e15fb0e0175005eb4c203a693591ea1155

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fef453faac231287678264d28009e9ac7375cea2627032681722bca1a10b51e5
MD5 9534012e5f2b1c8abe14f738a00dbf62
BLAKE2b-256 0eb5f32ac6656aac91e556e36ca847b33ab4703846751d5327989e752b60ea77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be0aa3917d81f1fa77b7650de20a2e1e25a5ebc16158eb8128f401d0f3cc7695
MD5 c7f14f32e931516ba75d3131531a7d4b
BLAKE2b-256 59dc8b41f92638c8242fe7d37b1fefb23908f21b89fef9822a862d525e730639

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f57914ac9222c92fedaab35bd9729999c2eeb86f04ffebeaa8281c46e5240050
MD5 c03fc8da3a5606a6407153d8e8f0fa5b
BLAKE2b-256 9e50664a21aa91e51509c69059f412a48c6dc7c0e8b26808a69edf5952c11660

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 48dc108d47b5b22e86d56c3685e8f957a6f0cc7d03ac16e5a5b5a138cf8c2b85
MD5 ebf744ac75eb57e1ea37c4c354fcab23
BLAKE2b-256 144c9398fa539efccc11500f812b322e64d3a55554b51f2e44bc372f458d2b5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 305b782308f4d107902939a3e00753e3ec7484ab94784e197263b77fa2e6a1e9
MD5 fd8dd8925ed3b85737e74e7127ba2431
BLAKE2b-256 f22b22c0dc610aa6b1839f003075373dde0e49a39681ca69d0eead6090facfed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 66c4d35d06a8931011afa55a99087ae76c78e4edd040dcfb5b9c2d2c9cbfda7f
MD5 8a650685866e5e0877513fd8590cfdc4
BLAKE2b-256 2a47ef71f77043f0188b748e28931d49fa0828e33245a38c1a873b8b5de5bc52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdcd8af53234b6b8c28840f2c5dbc7f4b68b4f5b61df94c2b8d1bd86d21e16ba
MD5 1da9bf2802a15eb5487511216ee9fe75
BLAKE2b-256 7c99d05fb609de7f32b756224b98da4da552ad2cf5808e690ebb12627fe5ecc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a1d2c0e2a8c1c2c0b5606e5dc27ba907402f8790eae1568f9d3997d94b1e28a
MD5 2543d702586d771d6763170aec1c35e7
BLAKE2b-256 a042a15217584f9b5a30819fa719ee1accb34b5d2ac3adab00fc4b275b9e4a4e

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