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 . --config RelWithDebInfo --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 . --config RelWithDebInfo --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-2024.6.6.tar.gz (161.2 kB view details)

Uploaded Source

Built Distributions

cyclonedds_nightly-2024.6.6-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

cyclonedds_nightly-2024.6.6-cp310-cp310-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.6-cp310-cp310-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.6-cp310-cp310-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.6-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

cyclonedds_nightly-2024.6.6-cp39-cp39-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.6-cp39-cp39-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.6-cp39-cp39-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.6-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

cyclonedds_nightly-2024.6.6-cp38-cp38-musllinux_1_1_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cyclonedds_nightly-2024.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cyclonedds_nightly-2024.6.6-cp38-cp38-macosx_11_0_arm64.whl (840.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

cyclonedds_nightly-2024.6.6-cp38-cp38-macosx_10_9_x86_64.whl (911.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

cyclonedds_nightly-2024.6.6-cp37-cp37m-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7m Windows x86-64

cyclonedds_nightly-2024.6.6-cp37-cp37m-musllinux_1_1_x86_64.whl (7.2 MB view details)

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

cyclonedds_nightly-2024.6.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

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

cyclonedds_nightly-2024.6.6-cp37-cp37m-macosx_10_9_x86_64.whl (911.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: cyclonedds-nightly-2024.6.6.tar.gz
  • Upload date:
  • Size: 161.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for cyclonedds-nightly-2024.6.6.tar.gz
Algorithm Hash digest
SHA256 e5ded353107eed53abbad9b2b384c366faf84e9e0a1db903fd2fe4616b5550f2
MD5 5d1506b03836d137707c5b3c35db989e
BLAKE2b-256 ee755d485e8c7d3a5b45bfa8438058621ee2dcca92be75c0e488677c08bc91ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5407769bd02824ec902b4c2251655af903d6031a26d6616de7ec5a9edfa2fa6c
MD5 f58454862cabc2d9b3126a3c5e1959a8
BLAKE2b-256 7bf597982e3299204c4adaab16c477f4528a5a4aa8b098d651a392ddebb58c31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 73edf5c4b8a96b852cf064ed9f039197766f26ac4263f9648562a83a90c0c1e9
MD5 ce63ef0fec4419bb402dea05539f88aa
BLAKE2b-256 1918d472631782b51e86ad18201e10b1f982bc08816cb39a3fdbe61d9df04f2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec0737ad69faea9474ae74776cd6a494707e6aa2654b4ced94da8a1d52516c1b
MD5 55c73bb1d5abd5c19e40be7c614a267e
BLAKE2b-256 335ec7d3a6036dedea31eaabdc6a84600799f4699d45677ec40bb02a028ef15a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 186488dc4cb8df7e1e9f7c8799b587c313e3f17dc135b7a4f0d0b05205901b4d
MD5 67f043d272d19aab3636fdf1ca620a52
BLAKE2b-256 1827ef342bbeb061298072c5699fa449ed00c7791c1f2f3fc550bb3bcf64129a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b01ccc24550edf24c40f92cec4d4264e03878dfa8aadc40063f0141243e10c73
MD5 7f0f8433005a01edcc0ef390cd6186c8
BLAKE2b-256 d04517615e40238060296cd222cb898353a0384cab9d0f0b559ac5470a97789e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a53302f46e77cc16b333eae672efc939a1e7bd61c4798fd5e120dace81d09c0f
MD5 53478490bf6f1345a0c66ec1d88adc44
BLAKE2b-256 9ad0c5f79f232425d5cff4a16baeca922e1c66dbab26ff4601bf88458bb3ea76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 9e4bf11189bec3193f128ccb1b48a073e09c36cac1014d82d4c7e0d318c4c7a1
MD5 55347a6fc96e29ea2555f4924b7ef197
BLAKE2b-256 ef1d094abebb3db1dc717508f56d394a8842c5ad66483290ae812ed8871159f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11258a2cd76969debde5e3da9434e9ce2cecf2c60b1fcb639dd4c3a4910af69c
MD5 a90bc94accd51cbbe6626cfe43f37d9d
BLAKE2b-256 1ea86b2564572740d464648d23efab5fd5dce9f04768852d25d178b88fef2379

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c2d4f0094c5906e398b98f0b042c958b8ae3807b653346fb436749468ea1992
MD5 d9427eeda6090ce87c46627ab6d119d9
BLAKE2b-256 e55ece1615d9133ecc59b62829de8c7b918cae0c6291480697684515d1974ee6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c33463b6d4c3d94ee45d05dabe37e93b27032ce457efb384486868fcb944e3c5
MD5 840ac67ed0fedca560843aa13091aab1
BLAKE2b-256 1178d4ff50006e21471ef980a48aabb34e55d8edf0b0aebbdcf2b508f352c3f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6f88d4bb0a53102cb620357c5dbb70ea5665debac35c4905847f7488418029d7
MD5 0dec0969197723f02fe92453b6e347dd
BLAKE2b-256 de74bab182a0c49684257ca2e48c15aaa95fb7112f6147c6faf767df9872548b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b609645d7df1dddfdfa15eed9aa44f6420ee75c20c5686c7d0b3c5bc44e072b3
MD5 91d8409901a03f446e18907d1ceb4af2
BLAKE2b-256 8c97926bf285034314aa513f6fb01bb37cb7e4346b7491c8323bc25094851b17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 859c54dd5b227343ff217712984871736668c1b0712fa97df334c812abdde857
MD5 b0f037fd99c682b902e6d3574372cce2
BLAKE2b-256 c92c7a9bd744d7bbbe2e475719aa95eb2bf14837f0b47155e1216e23cdcb15e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a25acf0a70ac192f5749a699d337f4cb817f9370534a1f9d3feef31b003d343b
MD5 74626a9fb287a07cae75daeb01cf5c59
BLAKE2b-256 8a29d00810fcc25890def9a2ef5e11cc9a17dcb423b25d67a29ddedcd02fe07c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bb59b4cc947617c6c0b24f612e8b69f5894a71fe0da616489253705db3c83da2
MD5 0ad855f1a8ccf1a5e157092e7bf80a71
BLAKE2b-256 26d2c9ccb01ca50dc397d868768eeba49f9a8437a5234bdd05f4693333376dd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 cc497e51418834219231ae64678e53aff2b23521922f2bbfb2d3c44530b32205
MD5 baa01a78d8187b3f9a58392c5ac0ecaa
BLAKE2b-256 95ca899c3dacc18fcdbcf1329a293a985800649d677478fc785d7573ff8b7c13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ddb8e3101a29239def2f19ac85e63323f89dc0b909f6dd156b03dc65a0e93b16
MD5 95ecb8f6c976e0f202d6d77dffda3bf6
BLAKE2b-256 dc193d79eb40a48a6b395142562e921b6b6d153e7c681f089f8673181281acb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 713c52fe52d21f56ee41c12808913b9424e67ece6de0bc0048549fee9cf247d7
MD5 8fae34510cd6c71513e2b730ad1aab8a
BLAKE2b-256 d4db062aa6627c08eebb4cb5d096e4d5c582f6d99fe4776c47eb76946f00a592

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cyclonedds_nightly-2024.6.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5ab352f5489abef9584105199cabe8b3ecb88a3736a7c80d61233cc50ab83864
MD5 f52f8dd261c6929fabed45e5c44b312d
BLAKE2b-256 1906f3e0692066c391e72e3d76335141bfb1bbfa821cf265813f8b47894414fb

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