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.27.tar.gz (157.0 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-2022.8.27-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2022.8.27-cp310-cp310-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.27-cp310-cp310-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.27-cp310-cp310-macosx_10_9_x86_64.whl (862.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2022.8.27-cp39-cp39-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.27-cp39-cp39-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.27-cp39-cp39-macosx_10_9_x86_64.whl (862.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2022.8.27-cp38-cp38-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.27-cp38-cp38-macosx_11_0_arm64.whl (797.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.27-cp38-cp38-macosx_10_9_x86_64.whl (862.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2022.8.27-cp37-cp37m-musllinux_1_1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.27-cp37-cp37m-macosx_10_9_x86_64.whl (862.5 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2022.8.27.tar.gz
  • Upload date:
  • Size: 157.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cyclonedds-nightly-2022.8.27.tar.gz
Algorithm Hash digest
SHA256 4bd036e07f974c81c38dd442985bfc6b1ea59355db506b4e22bed53b19def547
MD5 a4d84819721558f606c11d25847db1d9
BLAKE2b-256 c231bae7fecc8e186fe212d8a764246d303cd28325e15e9d4f3a7d1c463b68a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a74b76e241c249fe86457140278486b87887f91f8640baa40e7787242945cde3
MD5 bfa1f2d662f7fe69a922ee58e730bb29
BLAKE2b-256 758bf345bf6f003409419a541f8a12b55e31e188457f932e43b1c437733891c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a4863d66e519851868bf46feaaf0d5ee90bbc81be64cb3e25dfe7a65e5d618f8
MD5 5e2c4047ef94c5a1883369f0db566592
BLAKE2b-256 d5f40fb8a7511a892833863fe33884f7d348077d2612f561f98646daf13f0406

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4760795cdab02d7e4bd1e24cc68bbcb75d302382b9209a40ad3c73fbe0997e0
MD5 80ba916c2e84253a2c5b41edfd0c1735
BLAKE2b-256 b3e106c67f6c48f856630babae9b6736a71a79141bb23d7a09e9a1192ede14ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 781d23f42854cea42a588be39129b11ff6865b8c1d1f258d628c548ccfb03c69
MD5 9ea30d35394fa11dc1fb0bef58e7b826
BLAKE2b-256 20ad07a62cde4827e47d7142ac99c6bca939a6efba08332a1cb72f3cef3c8525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5548c55b5ddd4461a6854b07fa48517436375cf23c16609bcf8bd585f4466df4
MD5 72195600084ac7f6d9cd477d9be1e4e6
BLAKE2b-256 64610869b541cfdfbe5b2dfa117dfa05ce69228765212f990aa63d4c7fa02d89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4a86b979d157edba50cdefb4fc5e5e50406d50d8eefc26b8662522dd7a2a6e7a
MD5 400ae998d868b0fa1e0af7bf6eda2cde
BLAKE2b-256 60ca26ec93a531cd5902c5a2ee3302fb3569da580574bacc3fb793d93edd14b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4c83ae992007e3284ca9f40aabb9c5fb7ef851ac3a9bc6b53a4c5192b1501289
MD5 5bb1e0c0ffd885d0a3b5f148a46976bf
BLAKE2b-256 f62d5f8cf9d632093cd9a978b6dd24806f602bf416e91c98faa1745196182389

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 078d56787a9ccb04f2fa2130001955e77f6933f084e2c5922d4ecb6392f58f46
MD5 5af6356adffa342f8fd4f7822bb07b50
BLAKE2b-256 3e9299f2b80e8d8a7999993a519ac7abe24bc3362e7a0be9e7f7a767badd0771

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f5521696d2c547399702fb58264770591392ff07b5464d352ce9535e693a697
MD5 1c66bfa0f90eb5954b726e64c1009f4c
BLAKE2b-256 60166c2d681e4dc0576c1ef7952bb911f1f5597d7affbe1be69c15bc5df6d455

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 226ec06b2c32164f7f1d29fc90f2d1fd3f8c745ba4227d0e27a0aa201a6d9721
MD5 ec9a47e0523c6ad3856d7dd47426fe64
BLAKE2b-256 699cfcca948659363e2c49e6d2c601b996ccd1ef7f2b7a4e5cfaf2ee69738991

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1fe248440f48d587dbff51667a235a49d2650ec35a6bc24a5256cda6130a8e66
MD5 41e01c522e525e87bba2260235f90496
BLAKE2b-256 1af4644c6fdec49b799369d26377dbcb851bcb82c655ac0691c6268bf3f44c61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 65e441b60c161b9a65aea2c1a222346ee87de2c50a5d71a6434fb44e389c2f51
MD5 ca4f0abd9b13cd1bc0c719a81cca1e95
BLAKE2b-256 543ed9ef6e78f0e995c20c7e93db25c3152e7fe94431cbc2e1bb92b610660742

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6914eb6fd885c25fbafc1287765252c545eade25ef0245b38cbfa2c69d6324c6
MD5 92c9e45ca9130e5db3243655001152c3
BLAKE2b-256 d12aea62bea4d6dac727953e286294017134e4ac2ac5563c50e47c85cda0b4ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d4fe9c6c902f62013ab1ff4c4feefd80c755132823efacec2c26fdbda2329dee
MD5 b7bdca3c8e24448bc07766ee16b17739
BLAKE2b-256 91528e79124abc21695a86be22654c2fcb96faae9f7f12ea78af830c2be3c802

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eb91a0ec863c7d4b204a9685a6f6c0a03989b3c33f77a4916dbf114b542f9aec
MD5 ad00338cad42766b2dd81a33a6d686dc
BLAKE2b-256 c14fb6f744047904b73c956f775a00aa07d953ea58c1938656de09489040643f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a2b984287260b0e0a22732f31f8753992b6bc3c9a732f3ae27841660331dbf26
MD5 9e52b54b1a585fe69f129a14b45a92ae
BLAKE2b-256 3825befda0f5da8e78664cd172039ae28d03cfa83b0d19e9de8511183f65953b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8bc93bb3c6fcf4c141a74bb6ba12a8ef5d2ccbe6094e768e92fccda7848225ea
MD5 d02b805086fd63b4bc59680019764b2d
BLAKE2b-256 8a2d4846efea589b399a41807cce8c7d78df0a383344c6c320082976957dff65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 baa7e4b0aeca60f27eb050718334f06f52479c825b214df00cd9fc9958d0df84
MD5 52c70ecd5847501822aaf4a6a355ec9d
BLAKE2b-256 b33b9ae211e06fd318c3c661f0ed72e62f148dc4a250d2cfd38a44f71e7a299f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.27-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 54d1c286ba5869ffeb3e0702afa782029108251e7acce6057b1c97b4bb2b0e90
MD5 49309f4c5ede5419d3ecdf31b01aa2ae
BLAKE2b-256 30c9a12fe93537c767dcd096c945257060ae0a456c647b890939f36cb53f7f05

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