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 . --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 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

tensor_ipc_cyclonedds-0.10.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (928.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

tensor_ipc_cyclonedds-0.10.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (928.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

tensor_ipc_cyclonedds-0.10.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (926.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tensor_ipc_cyclonedds-0.10.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (925.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tensor_ipc_cyclonedds-0.10.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (925.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

tensor_ipc_cyclonedds-0.10.5-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (927.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 807cc7af5e76170cce2fa350163189d04358f6ccd3da1c1a881c46993267a525
MD5 c8102bece5d168752562a7da3717f0ec
BLAKE2b-256 52959547ed9ce5d27d0e25bcc73bdc303817aebce2f1b94b3bb299f91bef4acc

See more details on using hashes here.

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5dd24fc40f80e2a70dd8bc3b884306edf45c63cab4115959c1b8c713b45315df
MD5 73eea6f212bc5541e061f1dcc3982100
BLAKE2b-256 1ae27ab6c77b4a07e49ba7f39600ace1b088f55770c91175a03f619621431368

See more details on using hashes here.

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 69f209a7829d88a9cc7e5c93d4aa040b4d12b309326cba0040a3ebc72302f85b
MD5 df1399c157b77400130984b86629424f
BLAKE2b-256 cfd5f20bb2b20753456738dbbc44446abb17c1fb8cdae05445d56bd5594b966d

See more details on using hashes here.

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2a757fd66d522abd605c8ad86616cdc3627559629b678d2d0a6174039a2e5d16
MD5 09460409492d97f40e9434e8d07adbdf
BLAKE2b-256 ac140dac117b79944f7ac3efd0d8a46f35b027e207e58d417571b8a61f32dff7

See more details on using hashes here.

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 be61b544e7a8f2ce5cb77cf75e174701c5db9a10f48fac69ea2b4eb033938698
MD5 88a8399694006ae95fa674611f1b6100
BLAKE2b-256 2016c7e3b117273ce06075c67777de85d9c52fa973205568e0788cc7fdc5fe4b

See more details on using hashes here.

File details

Details for the file tensor_ipc_cyclonedds-0.10.5-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tensor_ipc_cyclonedds-0.10.5-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c17fe30146e1cde37f947f8a1bbf331755a3d860d5019f799071a6dcc4fc5bd3
MD5 8ba8dca8a6210963ea913e890bcf5cd9
BLAKE2b-256 207b184f46c61e7cadca5050f6106b2ee509ce46cfe75f22733b2d339997356d

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