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

Uploaded CPython 3.10Windows x86-64

cyclonedds_nightly-2022.10.11-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.10.11-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.10.11-cp310-cp310-macosx_11_0_arm64.whl (789.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.11-cp310-cp310-macosx_10_9_x86_64.whl (856.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cyclonedds_nightly-2022.10.11-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.10.11-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.10.11-cp39-cp39-macosx_11_0_arm64.whl (789.5 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.11-cp39-cp39-macosx_10_9_x86_64.whl (856.5 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cyclonedds_nightly-2022.10.11-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.10.11-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.10.11-cp38-cp38-macosx_11_0_arm64.whl (789.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

cyclonedds_nightly-2022.10.11-cp38-cp38-macosx_10_9_x86_64.whl (856.5 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cyclonedds_nightly-2022.10.11-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.10.11-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.10.11-cp37-cp37m-macosx_10_9_x86_64.whl (856.4 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cyclonedds-nightly-2022.10.11.tar.gz
Algorithm Hash digest
SHA256 b4ecc4ffecd19f85a049bd4710b68a6ad5cf2946b210b2992688abb3521e0f75
MD5 ae2faf836f262987a782180bad143764
BLAKE2b-256 72238e22472114e6f37108ea7e917b6c28148d2b903df94ef497981e20b1959d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8d782d7c4272d15c81c186fe915bdfe972c77a6eea279724a66fb569af32c2bc
MD5 ad672648b98165a7c7a8c7477b599718
BLAKE2b-256 1c5c33dba74af2c4c0d2774acbc69315175b27f5e197d899224b92e38abe1e6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 afd940e0d7a19159491e67d364977b295c4662e745a3c4891ca5bd3eebb6d9e9
MD5 a6f3a24ec856218d621b830b39c649ca
BLAKE2b-256 a718276bdaed8d4979c62e4c3921ca6f3e0c4fcc8b3b6e717497bcac31b99a80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 78d044ea4b8ddf22b3773fbac935c475e4a5998972e042fa76eaf612b1fdc97e
MD5 d79e1765e96fd0cb9702118ddd13c206
BLAKE2b-256 2b46e874823104fbbbaecfaaac63e6e33eff0e2444895f1928dd47dbb5cb1b67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc995e2c8008b149b62cebfa613c7ccb1a0c8dfdb604395ad90deee85ec0e0d5
MD5 6dc5cd89240e91cbf960bd118850c264
BLAKE2b-256 a0f5ea6d9d2fc94159ab4a76e7369aa1edf73f2a4b3e4df9ff2a41fae2eadb36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0b23dc90203c6441eb6240b222284666258fb376a2d5eec7ce75a3184cd88688
MD5 e5a26a3efe3cf11d8344ea881556a7c8
BLAKE2b-256 3941f02bf122e2d1723be8fab30b4b1c1e74d29e17fb0d49d062eeea31966b7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 94dc377774586364fe789b4c6961bdcc0142c7322274e370594be7d1086b890e
MD5 6dfec23594b985a091f693b8fac05997
BLAKE2b-256 6c85ee5483cf692bdcdedc7e4f201f017fdd83b45382b4d22f6f3563ae137ed6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 bdc5bcebb3865f080f1d69b88ea811e5d5c3426e711cba2caabb9c7231ec3f12
MD5 a3ba5fc88c253cd56ff572496887c2c2
BLAKE2b-256 c1594f426dd65e0ed4eeeeeab25928f72b0ed7747077007252c8c4f455328841

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ffe1866549842e885770feea1e7658699fd7a84824995c9ef9780c1cdcfdf416
MD5 dbf40372383a2e4b1247714cdaa1495a
BLAKE2b-256 2484cc1c18af50c08681d109a9112a20a9040ee7123100d5fa54aaa632724e3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6c10183998789776f990da4b9d379eb4b986c1f485382537a9ac31c2cb687aaf
MD5 d0b7671b895c7de1fb939b9dab014ffa
BLAKE2b-256 a5c8dc3fd2a70f83b3674dc8af345981fe07130d02cb70aff8e2dce410b5024a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f3094d0782ac868645a0cd1f5290a00738425780270ae06d6a658abc96dc9032
MD5 a9df1a606fc11369f97ad41bf71f1847
BLAKE2b-256 df129fe0f0cfa226d825be7130944b18f28900215abcfc15adefc493845dfe5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6fb3260f574d801179434335f9530513ccdd8442ea5e596deeff399db4629d4b
MD5 88d8b3536e043f5a9f947cf64832bf26
BLAKE2b-256 8bc8d9bf96f0c4e6406d369f794610267c9cdf77bb605a3adbca9247f88b72c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 bea670d38b784788c5f988d410429e9db8de7294c1c46c4344b27c45a6ec2268
MD5 9aaba6fda70ae4450f9799a3f66967cb
BLAKE2b-256 b5a39d098d3fa6e835355e9d924593daac68169a552fd7868c5e6dddc9d3dd3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9f3e2ed693d9da676182fff0cba116dfa7da2b1420d55af3ce2614968caf8adf
MD5 74d82b16e76219ac84b3dc1ebedb579b
BLAKE2b-256 206423c499a37fba46caf81b7ff1978f9236536dd47bf23baac43fef29c9b855

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 79e8e0348017c8b0c7f85a720893f6c789e0338980e03cd33dd55dc6590da0fb
MD5 1db1840937d7a79d6e501285eb73eb6e
BLAKE2b-256 8959e85175a53316d7b0e58bbdcb8754867fcf670f61630b9bd58728aef8392a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e92a66907cc9f3885a5cabb62a71caaf96fb1bba72250bca7779544b9319fe38
MD5 3f428f252bc1179880da90de15882aa5
BLAKE2b-256 3393c9bb3076bf95c98b198f88e97c707765d3c1fee2c3f7755a4abab9bf4ad5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 24ff9b7ae6d08b5a2fbaa5df5a52132caf8cfee711a255e7a81c5fb9524a473c
MD5 3b9769f702db16477e38acb06e709c01
BLAKE2b-256 556f271663d924c7bc8636162a028f559d8d3e3f8787b661f60a4ca38f294943

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 34207bfdf2936fc282bb3d512f326527727b14c30200d1b2b3d4ab71cc8f99e4
MD5 d1619d12b3fcc95acd72902ecba4c431
BLAKE2b-256 ddbe69a7b086f855c4f3e8fd7f8da71bd4179160ce528b8059763bad61806318

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f713de2f87f7aaab7847fa135bf09d37ba289822583337dab2b914b77b7ca9f
MD5 bfa8153f9f8169b374f866eb2a71760c
BLAKE2b-256 63b881a891a4a3b8306dffc0246e7d00298e4255b8d1e74a2a09e2d0c13f6512

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.10.11-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fe5f50f2f3c9fdc537ddb14322bbcaeb6ecbcab9890d7afe4f2dba1fd96c94f2
MD5 f41d23f8ab6c01a35a5b742ac6f1689f
BLAKE2b-256 2d4017c736cfab49bf1f420536d3c262788556e430493ae9e2c2afbeeee7b291

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