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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2022.9.24-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.24-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.24-cp310-cp310-macosx_11_0_arm64.whl (785.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.24-cp310-cp310-macosx_10_9_x86_64.whl (852.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2022.9.24-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.24-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.24-cp39-cp39-macosx_11_0_arm64.whl (785.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.24-cp39-cp39-macosx_10_9_x86_64.whl (852.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2022.9.24-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.24-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.24-cp38-cp38-macosx_11_0_arm64.whl (785.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2022.9.24-cp38-cp38-macosx_10_9_x86_64.whl (852.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2022.9.24-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.24-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.24-cp37-cp37m-macosx_10_9_x86_64.whl (851.9 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cyclonedds-nightly-2022.9.24.tar.gz
Algorithm Hash digest
SHA256 3a6f384ba5963a538e2e325716ee26132081d7357792e5f6562d42bf6cdeb300
MD5 d4a730da8831bf1298a3c05b817b45c3
BLAKE2b-256 76913ab61446c4b1a252fabc31bf12870520923b4346cf3ff5d2a11e4ec133a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bfd0af98ce480f3c962a2edb16cca55b13296eacc0651ad120d82792bae9d2af
MD5 cd3bd2518930c1d05f3919a36881a59c
BLAKE2b-256 e298a1374bd7c58571a6c8b338da7894fa42544b897ca4d7072840b14de5cb72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 bd9a25e953c853f4632e4e6f03602fa2127b998c09c3349ec5ce1dadc6fe8e3c
MD5 de774359968f06d8985ef6e06dd4828a
BLAKE2b-256 3ee4fb7793f1bc316c066068879e8d94512dafaab92033a6ae7d44d257aad89e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0dbcfbbda0d153a42818536d4a976bf662aeff2f5700cf3a6c0f4ffe71a8ba46
MD5 81f57239543c594a473353c44bc9dbd1
BLAKE2b-256 38beb89c0a0a1eca66c90e4af1f0f63a9eceb7eb8237367b09c676cfe1e07af9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed54f46322ea47697ff0f4f29157926942faf72cdd8748099cd29447c23a9267
MD5 a9284be3366137e26f82d368438bc775
BLAKE2b-256 54c05ef93e984412a58876a22f0b6ad7cb0fd60f6bfec8eba04e2cd6f736b87a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bcc9928995cd2abcb1134d4eab0ebe01cf93c9c6711bbdc9c75e6f3ec4648acc
MD5 afdddac030958487e39222573ae83eda
BLAKE2b-256 1e36e449e91384d81a32fa0db0aca5e02043d7510e88b1da3a33f6db9aff99ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bb893b4917b361d191a2835164320be71aca309aaf8fdcf703cd39b16e41a3ce
MD5 9664daf6554b93fe2ffe3524305a61a7
BLAKE2b-256 8e904f47c5955809e488c94b1ffcaae4e2ec7e94acec5a43473531fc5a6f1433

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6526acb7e1d476b2ca8935e0a2cf720d0150df48845c085dcea7dfbc5248b1f6
MD5 3f63df09c99e3a4c645b851686182e7c
BLAKE2b-256 b8f72840f7d0c09a46f294cf440c7d7c9e6a8a104802a6f6bbc4d6f0277874d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a31d41287e54d163de909b508a915528bfd0fa1dd107715cb14bfbb0a4d31f06
MD5 596719fee9a75de376dce3cbcaeef2ac
BLAKE2b-256 2642ce4eea031ed0ddf9a0b8ea41e16109c0537c355f9b46276eff306976aa89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9932f199f51e3483443ea366193c7c51c758525f48c6bee165dcaa4df0bd052
MD5 0846b6618eb69885b60cff28c821910d
BLAKE2b-256 04601cd5aae4bb4e619b6633af99036c6f16f08c8c78cc28afa8130e4da73009

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0bdc1004be602e229c17cc193c1d8e636488177989505527ce921bfac2c8a370
MD5 195826c0f74a5928bdc8207817a29626
BLAKE2b-256 bae333c5abf907adac9fe41ed7bd042fb8cf6ad8d41ad5847c351467e564047e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4c80cb86cb00f96a4e9f74b5038c111c2ef88e381faf18d8ec145c2af44ac32d
MD5 0213fff91ca415448b225432fe9c9e03
BLAKE2b-256 1821f4cb19e19725ff9710934c7af84e01d711a64ad3b7c5ce2c25b7934041b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4fd5d1981295d9458bd750c5449cfb978e8a15e8774ca0eeec0c0f16cb496d9e
MD5 8cfbe4ba08674b430f0b498858fc29a4
BLAKE2b-256 d34d15344cf2cd667275b6f6a9428c0d8dce57f4535f2785d82efd8948f5363f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f061defc8d878f8cad81caa1e33482123737cbbef7e1baf67a1c7d26355b12b
MD5 c9746e8eef84c17043aaf850f779607c
BLAKE2b-256 c7f771d6e414a9de5fcc83d52ee8fb2bcd985838e09e189b576e4b04e93d3b0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 109f2ba944b44da46045c9a70f8a328603f2c83cfb33d0dd69c083ea5dd1330d
MD5 7bc5f2c51c2333107e38a30e9307d3a8
BLAKE2b-256 3a65b153bf2820c5fedf5578491eab531b46cca9c4665b2a0e38131d91711962

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6b4616b46dc91d51c8254270c8fd071801267a009473acc630fa95ba50a44e17
MD5 3f6845e1d6dcb68d82ae199891a4d5fe
BLAKE2b-256 7959805bc02740dc05297429f2a1abc4e9f34ae741c17e84988396a912d99106

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1df06a0060f090429e754650456cedad1c866bcb9a56749bae6a764deb06f6f9
MD5 be2bdd0fe183ce47b2a5c7d235f722af
BLAKE2b-256 6798b4c5cc82a0fce2519682a20024bac901684ea7b53c8630d53c0b2cac877a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6e5a570845d489cdcfabbdaee3d838405967204512385d2ac54a3eba7dfc80da
MD5 2656cde0542c7640db33cd0e9180d121
BLAKE2b-256 ce1e500fa69e4be5c105e6e70a3e5f9b73a7ed5898b13b0005fa86bccfd9d683

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f8208efaaaaae54034cd57c755502bdef8a9f12093c0a40ca6f4f6a26e7d17a
MD5 58cfdee028b42793858f60ce6f30ca27
BLAKE2b-256 b828804c8ce21e6a8d6f461f1f9726f2ddb520a522ae5ce428b1c9c8584cd0ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2022.9.24-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 34344ebce8c4b4a5f947a9b47d8bf73121cec1851cd2d9ae37395c6bc9f8a90c
MD5 d3543bbdb301023ccf4fd8c28b7610ac
BLAKE2b-256 286e714c385112f945061bdd8e69fd077defd693a56eba9edda8b1e092e486ae

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