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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.8.11-cp310-cp310-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.11-cp310-cp310-macosx_11_0_arm64.whl (802.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.11-cp310-cp310-macosx_10_9_x86_64.whl (867.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.8.11-cp39-cp39-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.11-cp39-cp39-macosx_11_0_arm64.whl (802.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.11-cp39-cp39-macosx_10_9_x86_64.whl (867.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.8.11-cp38-cp38-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.11-cp38-cp38-macosx_11_0_arm64.whl (802.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.8.11-cp38-cp38-macosx_10_9_x86_64.whl (867.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.8.11-cp37-cp37m-musllinux_1_1_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2022.8.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2022.8.11-cp37-cp37m-macosx_10_9_x86_64.whl (867.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.8.11.tar.gz
Algorithm Hash digest
SHA256 5446abe604f3df87adcd52ff557ea0c4cb76106851bddebf9d948372b1cbc8bc
MD5 f9a662b4c991ebd02af4dde369fd372a
BLAKE2b-256 cf7d63109f25414664ace24cefb91fc7880eb8ec0b4c1471d40569be2267513c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8730f547e65a9e18766d2c90a654bb67fa5019ef32b10f73777849e4da87ed9f
MD5 ef58e596bcd218519df505f83fb3d8d9
BLAKE2b-256 9d8df432c61f3677550adec2488d7344e79deb17a5ce5bfd14bbda0d57dd647a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 973d4012f5bc4c93179d46065bf1ce765c001816637e69555212aff6a2644f83
MD5 f6b3ffb05744ff9c3a7f8a4fb6dd846d
BLAKE2b-256 d104b0c283fa4828cec9f59a3226263651e26363354940d01adf70b9c9b594a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e90d7d360f22e124010dfe0e91149e1200f49aa18c3d9b63d1f851d094d04f1
MD5 dc2414e4e66676247fcb844220bf1cae
BLAKE2b-256 125a0afd4538e5003bf1b0c75285b1ee39a21ba1b5243f5cf2431fcea22a5ec7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de159e5e3dfca0a90c6686b4c5db4dcbbcb7a086bff2032cb43bed4e843dda53
MD5 88b1f4d564aa604f992367eaf68d268d
BLAKE2b-256 cb28bcecb9c6f3cba9fae2e37e928c612e167b566ad329fa2382174928a55dab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b3d54a318a5ae58da569c58c1838e2e80fd34112b5a660a72e6cbb16d5a9f54
MD5 073c2c55b06c8a7fdc8db7ef0e26227f
BLAKE2b-256 41e490cb8efdd8ea35b7f187e57ef804206d0eaf417f2e8e2f5f483cefa44df3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c87ea3d4d65eaa171d0c48b919ff1ef446206bd90f6c9c48754b79a227d6d5c9
MD5 877e484ef7cea7b3c3b2f8617c06770d
BLAKE2b-256 ecc3c34017b0e8f93e0b631d14a7edc25e250d6cf897d4dd4d6aec9aab27046b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c9fc5993f65c9dea2587cd2b0871fe14b99ca2942ca451a213e9824315e11eb7
MD5 4b7fb1d3aa3d5683078e45444a0dcaf8
BLAKE2b-256 95394e384374e67cf0726d52d338dd8500483373b2c70b527c1327ff51da6457

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e33d8a2fdbcacd2c8cf3b234f820e054d2ab44c01db59f7a1dcf1ea8646c1270
MD5 c1fca3217f3060edac4fe3c80a079d80
BLAKE2b-256 7e23476c5c192d7da208ada47eaa5c240c1f91e9ed775f6209da7f918e73d50d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 904bff39dfdffdef36eed663f25b8d26c1fa45aef731a5fd1e0cfd78dffeefc7
MD5 6ced05dc0b8fa3a8039934b50a56e318
BLAKE2b-256 ae10dc485ff7d85b59ba5ec3af3b322d38b5d9ff944936bcb7de37fa0888e305

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c88afd409635738348fcd1da7668c0ada8a32b68c0f67264af699a29ee5c778e
MD5 4d4e5b63542cb1e31e49bc068c86cac3
BLAKE2b-256 6a49f6d8abb12d4b8b594958cc3554ea443d9988cba310bf922ef357dfbf6abf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 88a3a652f85846fd202079350c7c82547e03331a3ae7da369b40c412cf6f74ea
MD5 eee826cdedf56f4f081d8d737d4c8f66
BLAKE2b-256 c94185b09f3062df0656a8b69c5b1c5c6f4835594dc71d2ab6ec9c63acd7500c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b9699c3188748fd061a429cb354b8357c5fa1fbc4d1505b1e86f535e0ff368c6
MD5 63123d75055440903e52d6efafeee353
BLAKE2b-256 b13171ec60a6bef249d9ee718d9cf8ac5e72cad2bfc26e7bbe6e920ae04bd769

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b93efb8bb7e3cd4ab1baf179222685ff0a092b20805561e2c040f79db248f794
MD5 0bb91f24dd85831cddea14a9ed57f463
BLAKE2b-256 50a0eb515b8116da73f39596f428f63740dcd518cefda5a743f34f4bab99b31a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 46896266d6ece3385f2169b87b82d792daee534a9b6776cb8f96f9d99a814c48
MD5 84cb2b1c0dc21e84b40c0e95a7b17775
BLAKE2b-256 e584866a3964cd2ca101f1cb828e83448dcc8a21bbf14fbffbcabc3a2413d017

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d1a4513dee30f7b35635e20d4f9f1ca4eb76d81328aafb36573df5fc14da974
MD5 09726cd66213df648c39075cd3f46401
BLAKE2b-256 9966fc757541f33d2b4b32d57d9cb6c5572f3ea0038ed79351c4b9999737537f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 47b47e96bbeb1a4a2d6a74543a2e15301028617e2ca3041e5151c87d4cbf7976
MD5 4b120201575288abc542e91faced9044
BLAKE2b-256 5bb5d8a034f44376735dc527cab0a37dc6ef71688c2293e65bff34e53878da6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3c2f35073775c8acc1a9c300a48fa76895706067d0cd166c76de3d5bfc957425
MD5 359973e7b1635a2776019e9c8b408718
BLAKE2b-256 afee78fd70452bd95b035a7b22d65bf1e4bc034f78dfc1a45f866b6b93148aaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91098d928cb92b0ae651a192c75583a326a077cb6ac47f65ad6246b1e478ad4d
MD5 919c16540c0798edea5c7365a7ca61af
BLAKE2b-256 4c08b486a3580a71ea7a166219e059d0860553e8a9911f865e3699d16c30893c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.8.11-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bc3b370a0c42a236354bce6a8c9b781096f8ba4df5c575b0fb4ae2bb2701d28b
MD5 43360565ae71bdf86b00552408bc6081
BLAKE2b-256 9ce5dbe7fe6e3d77934661c7022c6cb1a12be7a5cf62e3c554c98b421dc19be8

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