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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.14-cp310-cp310-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.14-cp39-cp39-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.14-cp38-cp38-macosx_10_9_x86_64.whl (851.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.9.14.tar.gz
Algorithm Hash digest
SHA256 f31263357ee4d9b6962cc79480abe1e44e1a5c316d0732c2686915b512a22e5b
MD5 888594c5d2710c8b9495260521cb0536
BLAKE2b-256 6c5c593a21b2904d2edf4ad04417a28c97e85f0191f9870dc5d88eb739c89a6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9c6c30b6480eaa10585b3d9734e1dd94f390971be33e426e1e5e366c47aca83e
MD5 3bd007dea4aaec4b47c74854afde326a
BLAKE2b-256 85063a1989233e07036b8e285915e683ce9ddb0ee9928ed7554c0f482afb49ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eb18ddfefc4df410e61b6a4cbd0e610b3c953606aab16a55d5794f18ed91ab24
MD5 0475e7f80c912cf4bef964a96562e068
BLAKE2b-256 f84feaac964d1734a6fcca55a3e4b982af16bcf40ae9bd8e6e1bd1546975a8b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0c1744190a9678116ecd3e71ca4722e8e041ef665b2f66387d1a2715360ee49
MD5 01c1461e474ca83ae4c6553a385a718f
BLAKE2b-256 32c2c550d29533087e5e8de1c8fd9be5c5c4c76ce17a251e7205882e3d32e5f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c200e905c1ac546ae2f6a6a503ceaf1afae7187062852457c42319142c97fb4a
MD5 58a8767c197a618fafd0e551cf7e9021
BLAKE2b-256 bf60666a4409ab81d54759de5a9e95a1de505e1de54323746d1c11bc6a877d7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d38b30f5b214f70793f47b0d36ec98691cd5fb15e9d5bf61c534237082559667
MD5 0e1b6122375f8e953c2afae2c3e9a143
BLAKE2b-256 44bfaa75d7b93f7be2245fb8b934eb07491f8b67393324ac17ab6245a63299c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d3ee98a89e2ed26f0f5cc2c8e6ff07b33807bcd7b0d091b40068122edbd4615b
MD5 010c4af503360b10ac2ea1f747e1ef8e
BLAKE2b-256 f2876f800691d02e150c2ce50a455e791beb93b1f80f10ea6a5d68a5d6cfd9f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d5d09bc1f96f1ac1c6a7bc007f68fbdf4b8c18018084cc35ea1d8ef765e1a406
MD5 7b80b205cb93bf459ea876d74fdef84e
BLAKE2b-256 4797f89e02a2120b09f9768b542419dba8f993d1d931be1ebbe2613f5bca281a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 57f961bbcb3f8cc238c8128facf376fd798b5918b21a0a27a1432e80db5f0eb1
MD5 100d6c18b08f1aa7eefa8797a531b038
BLAKE2b-256 05f20439085e5496c4f6574877c5a9ebe5ec4f42d78dc26400f7d296357c8e5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3605d769783011d1cba5883a93abcc2678592a2e9d634a88ed5adabc90124893
MD5 bf783290f67dab631e9660200ae8d735
BLAKE2b-256 d94a61ad4e510f423b887a55fcffd1b6924bbd213c03a1dce7dd5dd69b540cb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 334aabec32098d864646f6838c97b1c3d1f53f57b3252bb25b803c3da085046c
MD5 75887b1e99281fa91d2675c4cd16e9d1
BLAKE2b-256 866392d1fba9434f59d41e3fdb9556493e40af8ad00d2edd65c93cae7fb75016

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b99349ea9084e52623e9fbb5d0007aa2763207a3c595459deeccbb90632a28c1
MD5 a9c78ebe6e229a33ee85fd99279ef946
BLAKE2b-256 719f17d4fcf57e137c6673edba572c5b507fbebea4f4a7f291ab06048c7a7e86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d0e9e8490f32478853589f8b6cad39fba4bde6f2c47bfad1dff98abb8ce2df9b
MD5 bc967a64d122dcc42ec1d4d35abf0d40
BLAKE2b-256 71cfffa598326ab3f2b9c10737e51a4bda50ff41a7f49cb640569d037947fd59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd95ba611e7a5aeed7ccc33cd72a27b189553864d208d5dbdd55b850baaa0f2a
MD5 bb7d87707a0dc33af1a42e747ffd8bcb
BLAKE2b-256 5f7cf72633cada82254e221d30cc6b11f65378ebd0ad52f65f9941a082866c8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e960197a5e5bc462a8642ccfc1c4b3545783577db5b870ad2623add68da430b
MD5 affe93aa0004621571cc2ea81ce422fa
BLAKE2b-256 a8892da7e36c96da853f8df7ac8a097f1f089f7cc43902c24eca1714b38a8a95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ca269e9ee9e79a8195d20d0699c891a5734b7bbd29d702b09a65fd362fff1d72
MD5 7e95e10b88bb0ef51354a42aba08debb
BLAKE2b-256 2e9a64cabf76f56477830041228917ed0f31bf26801c2becc68f312f5c011843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7f2ef32d42a799fa6798ad3b82dab6c7a078cf35bb5e55c56b072b19790d9461
MD5 156354581425d1820b4317a000479e18
BLAKE2b-256 166738757d6a48548a59d53ce6b212e396373d06d80e30b2d56a08aaff0d8a47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 80cd9d635a0e123570be86812113a6f6dc69b8c857622e70a59b8af9db227493
MD5 d9622dfe684e673a700335876c5b63a3
BLAKE2b-256 692eb5cb40a836f0475c51eac276522a559804fe6ce1054007688b951883e89b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 068e5dcbccb0e3e9a8dbdbf8c6c186c5ffdb069158020dd26ca9fc0185393a67
MD5 7bd993b125b31d99e628d7f8da322322
BLAKE2b-256 787275eefb02d2f9fd4c8cfae37776e15b983225130a8647a288a4719386a807

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.14-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 459f730f831e2c7ab6875718c00c99af46c7236107a93aee8d7a1a1a809e0282
MD5 c6da78c40d6df67d3dc9c45d55cc63d9
BLAKE2b-256 2263c3a87b576b2dd7881a74d04254a6b3f54f9958edcc703a7c021421c07310

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