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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2023.9.7-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-2023.9.7-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-2023.9.7-cp310-cp310-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.7-cp310-cp310-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2023.9.7-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-2023.9.7-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-2023.9.7-cp39-cp39-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.7-cp39-cp39-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2023.9.7-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-2023.9.7-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-2023.9.7-cp38-cp38-macosx_11_0_arm64.whl (795.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2023.9.7-cp38-cp38-macosx_10_9_x86_64.whl (862.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2023.9.7-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-2023.9.7-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-2023.9.7-cp37-cp37m-macosx_10_9_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2023.9.7.tar.gz
  • Upload date:
  • Size: 160.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cyclonedds-nightly-2023.9.7.tar.gz
Algorithm Hash digest
SHA256 176a08ce5ade835adbeff5d30191012b0b005440395f17bf0adeac64373b7422
MD5 a06ccc1b5c7c277af722a8b55c0907be
BLAKE2b-256 a885406b0c9da50e763a9e75d6805501ac1d013f92aa0bb313de421a6939ea05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 72b7a7861cb2d1f2b9de3068e3d3b5afca37c782c6eff318a732e281384b762e
MD5 c45452d95f57a5b4813e10267f3931e2
BLAKE2b-256 87897a821580991dc01e8fa3f07e8dcd439f3630dce863e03012f1f2c92a8334

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3cbdbfc6f957e8293dbd63c20afba35dad7e28bc2de711cf08e4c3857d322581
MD5 ff58e7d4120c81121002f54fd7dadab6
BLAKE2b-256 9aa6e5d8ec0667afb1c9688d3986fc355a88a6bc07b5d5baf6b8b95362b388e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81fc3e90c20596711ef556d0285eb41f5cb8f0a1bb7e9183d993a0d5a24fe25c
MD5 98b7afcd22a7d84d1748081a7e188a93
BLAKE2b-256 62ca63d8f8dd94466a91b75e01adc9930e707e3e679554308aa110b2c977e037

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e5e13d4d33b5ca279c51f8d9bd0b3565719addad27b8e17b1daab1fd5c453e9
MD5 7208ea79f52091e6572a663d4afa062e
BLAKE2b-256 477d3bf0a0752b6aedb720f01a689e34767201fd40285cdab28dbd1800dc7f14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d44bd2312a243a99a08b220c059a1b2647c6089740dcb1f5e9fde28f04fb1098
MD5 02cb1ad37b99e6a3ca82b614e0b8d264
BLAKE2b-256 21051ee265d561c90582bb1126b394be09cee11197e6a780f29f6bcb143484b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4aa4b63c24765f7bbec4fce816ec75b806ac02782251e834915a152c96bf4bd3
MD5 150e08bbed4193cfc8d70e97ca38843c
BLAKE2b-256 7ae44d640969dbca4368de9aad06140f446f3f7ff7b7d72d8abe7a0e53856038

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6de2a2854615e05024cce0d79efad3938d518d1ae9127de2fb7cae1a08d2f432
MD5 192e4750490388b2b9cf068df2266966
BLAKE2b-256 3e34b2f2abdb0ad34b2452960d51b3b19ca4d17646afe546430af93c1f370f7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4126bf16648461df10b428276e51ea7123ea402a9e1cba7e76358b83d675a69b
MD5 6313a4b997ccc26172ebb825f7395f93
BLAKE2b-256 d45fd51b8a162796cac1d7dac46cd08d699641f07a2f8fab02b6c11221ffe055

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e31b130fb2e942814dd70b4a4bd2b4915e64b9679b537e77c7f618468682b030
MD5 187903719bf4ae08203ad8e960c9a7d0
BLAKE2b-256 2f1a01f26e52fcb11150f2e35b41c73cdbd36d1dd4bc5c3ec3f1c938cc911160

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 84895c3bec8b3e7484c661f57ba00855dd69370ff8bd9f4ff9711f5104a72cb5
MD5 b6849b526088dd922ca0f2215461311c
BLAKE2b-256 593f4684cca14664df0f4e13efa14f877d9582d600d81fbe39c5bc6a5167af7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8418c2f40a15ee7217e03cd0562ae2e43b739546a8d2685bf4c306a4e4f57479
MD5 8a467b6ba785dbce12f31cc0d3430ac0
BLAKE2b-256 ad812eea2b1f9b6be52740a0d58605bc3411fb09ab3f04d7ba12ddb6b599fc2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 584cec312b1d1047878d3a61007e5276e006f57718bcabff630ae58df387a506
MD5 afc1805c595d55337376eaddb83127dd
BLAKE2b-256 a709ecf3163b03e240a71b1bdaeb35b5426e3436e7d7fca2003b4e1c83cebdec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 927a419bddda399ae518dd8145d9e0a2ba5ac1b27731ec86eadc10f4ed693543
MD5 7efa5e37f8e30fac32dac554d67f8061
BLAKE2b-256 bf2871f5b4f406b7b0b3abe93a3a3ccd4d96d4108cc496e774da827ee2cdb580

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08b00cb26bd51bb54486bfa579216d66133eb6fc0535d2a4da844fdef8fc7c4d
MD5 d4ef728395e4777e0b6620188e9e0712
BLAKE2b-256 8e380e717ba0523d95d5e642c7341846353bdeab4f84ecdfac0acf9f88c605f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 570e60d25862f8e1ac0f402a06fe4186d2877a4360770983e9773a8b9ed1a7a6
MD5 08cfe918c8d56fcb3cbc8a21f970c717
BLAKE2b-256 fabf72fa7c4056059d20f086fcb950b4a70c9312dc70839c204bcc5887486c3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e5335ebea07b603240a2223009f1b8633c446594a0cd0cf684b3c0fcdbb48e3b
MD5 40a075885531dc9344a3640456ab5d88
BLAKE2b-256 b0051a3d2e1be21790566eb80e4a5b32f2fe095546243d60d556f67aa209b349

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 622135d68562659e0bf6c2bf813dbad3e958f497e47f251a54d35da27ca229cc
MD5 a647e8fef98462f2d945566a9657fad8
BLAKE2b-256 5bafb0e41dc8341ccc401a7d8b3ee7ceb67b444f65ca201e5c82e64882e41995

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6cab80eb25fd5200bcb2d558d0fe0fab579b946744a98958b868c6487ffd22d
MD5 e149a72c1957aedbf27789fc60c6d696
BLAKE2b-256 bae4a783e440b1c0cca08041385822376b3485f82b0719637f1838d3fe06f8e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2023.9.7-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c102ec03cab33f9182a915e2f94b2054e8dec060324ce44ea5c53b68c8131c46
MD5 4e48d4141c14a1cb9bd6a95617191283
BLAKE2b-256 ed948c86ab15cbe76134258d5650a8d6b7b04a7543ca0968b248b98bfad9ea76

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