Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

zerodds (Python)

Python bindings for ZeroDDS, the native Rust DDS implementation.

Installation (Dev-Setup)

# Maturin in a virtualenv
python3 -m venv .venv
source .venv/bin/activate
pip install maturin pytest
pip install ./runtime/python

# Build + install in develop mode (rebuild on code change)
cd crates/py
maturin develop --features extension-module

Quickstart

import zerodds

factory = zerodds.DomainParticipantFactory.instance()
participant = factory.create_participant(0)

topic = participant.create_bytes_topic("Chatter")
publisher = participant.create_publisher()
writer = publisher.create_bytes_writer(topic)

subscriber = participant.create_subscriber()
reader = subscriber.create_bytes_reader(topic)

writer.wait_for_matched_subscription(1, timeout_secs=5.0)
reader.wait_for_matched_publication(1, timeout_secs=5.0)

writer.write(b"hello world")
reader.wait_for_data(timeout_secs=3.0)
for payload in reader.take():
    print(payload)

Tests

pytest crates/py/python/tests/

Scope

  • DomainParticipantFactory, DomainParticipant with assert_liveliness, ignore_*, contains_entity, get_discovered_*
  • BytesTopic / BytesWriter / BytesReader for opaque payload
  • ShapeTopic / ShapeWriter / ShapeReader + Shape dataclass for cross-vendor interop against Cyclone/Fast-DDS ShapesDemo
  • KeyedTopic / KeyedWriter / KeyedReader + SampleInfo for the keyed lifecycle: register_instance, dispose, unregister_instance, and the instance state a reader observes for each
  • BytesContentFilteredTopic — a Python predicate over the payload
  • Status getters: publication_matched_status, liveliness_lost_status, subscription_matched_status, sample_lost_status, …
  • GuardCondition, ReadCondition, QueryCondition, WaitSet
  • DataWriterQos / DataReaderQos — all twenty-two DDS 1.4 §2.2.3 policies
  • DataWriterListener / DataReaderListener — Python callbacks per status
  • zerodds.topic — IdlTopic / IdlWriter / IdlReader, a pure-Python wrapper turning a zerodds-idlc generate --lang python descriptor (ZD_TOPIC_DESCRIPTORS[...]) into native typed entities. One CDR codec (runtime/python's zerodds_wire), the same TypeSupport bridge C#/Java connect their generated companion through — no separate hand-written Python codec
  • zerodds.aio — the same calls as coroutines
  • zerodds.loader — the ctypes path over libzerodds, for a tree with no Rust toolchain
  • Sync primitives: wait_for_matched_*, wait_for_data
  • GIL release during all blocking calls

Generated Python and native topics

The current shared IDL CLI generates Python classes, wire codecs and ZD_TOPIC_DESCRIPTORS in one module. Each descriptor carries the exact IDL name, class, key contract, extensibility, representation and available CompleteTypeObject. Its encode/decode methods handle payload bodies, not native DDS entities. See the fresh-output consumer for concrete usage and the boundary it checks.

Pass a generated descriptor to IdlTopic to establish a native typed topic:

import support as generated  # freshly generated from the support.idl fixture
descriptor = generated.ZD_TOPIC_DESCRIPTORS["bridge::Point"]
topic = zerodds.IdlTopic(participant, "Points", descriptor)
writer = topic.create_writer(participant.create_publisher())
writer.write(descriptor.cls(id=177, reading=1234))

The immutable CompleteTypeObject supplies native discovery identity, keyedness and extensibility. Rust reconstructs its common AST and uses the existing codec and DDS writer/reader policy paths. Python codecs run only at the binding boundary, never from DDS cache locks. take_with_info() returns generated values and native lifecycle metadata. Keyless types and scalar/string/enum, alias and nested-structure keys are supported. Generated descriptors carry the complete TypeObject dependency closure, registered before endpoint discovery. Missing TypeObject dependencies and unsupported inverse key contexts fail registration explicitly. The descriptor's generated representation is selected for both endpoints.

The two-process generated consumer checks data and dispose reconstruction. This is not a cross-vendor or ROS 2 interoperability claim. Fixed ShapeTopic and KeyedTopic routes remain separate. Collection, union, optional and external inverse key contexts still refuse native registration. The pure descriptor's Python inverse callback is more limited than this Rust native inverse and is not used by DDS lifecycle. Generated modules require the matching zerodds-wire distribution, declared as an exact-version binding dependency. Its package sources live in runtime/python. The installed-wheel path does not require a repository PYTHONPATH. Python 3.9 or later is required by the shared key-hash runtime. The installed-wheel consumer installs both local wheels offline into a fresh environment before running that generated native exchange.

Documentation

The binding handbook starts at docs/index.rst, with examples and their current transport boundaries.

pip install sphinx
python3 -m sphinx -b html crates/py/docs crates/py/docs/_build/html

Architecture

The Rust crate zerodds-py builds as a cdylib (zerodds._core). The Python wrapper python/zerodds/__init__.py re-exports and adds pythonic sugar where needed.

The extension uses the Rust DDS core. Generated per-topic support now connects to its existing typed entity paths through a Rust-only shared codec. The Python facade does not expose every Rust API contract, and typed registration explicitly refuses metadata or key contexts outside the bounded support above.

Metadata

Release files for zerodds 1.0.0rc7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zerodds 1.0.0rc7
File Size Uploaded Provenance Actions
zerodds-1.0.0rc7.tar.gz 7.6 MB With provenance Details for zerodds-1.0.0rc7.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for zerodds 1.0.0rc7
File Actions
zerodds-1.0.0rc7-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for zerodds-1.0.0rc7-cp38-abi3-win_amd64.whl
zerodds-1.0.0rc7-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for zerodds-1.0.0rc7-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
zerodds-1.0.0rc7-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for zerodds-1.0.0rc7-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
zerodds-1.0.0rc7-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for zerodds-1.0.0rc7-cp38-abi3-macosx_11_0_arm64.whl

Total release size: 20.6 MB

Release files / zerodds-1.0.0rc7.tar.gz

Download URL zerodds-1.0.0rc7.tar.gz
Size 7.6 MB
Tags Source
SHA-256 checksum
How to use checksums
34e127da4ec6357649c8218fb324501f72dc6d8df1d67d686c204f17cc2552f0
BLAKE2b-256 checksum
How to use checksums
ffb06ff1aac9dc33af619749ac3638aa23ac20465fa86769aecc9d3516cad682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / zerodds-1.0.0rc7-cp38-abi3-win_amd64.whl

Download URL zerodds-1.0.0rc7-cp38-abi3-win_amd64.whl
Size 3.3 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ed686a248712997b44f2c371665223d9e1bf127977fdc41a6a15089aebd10856
BLAKE2b-256 checksum
How to use checksums
8776b3122994ec692e61d4d1d2cfdec771681a3043e767cf3156b4d429dc2d5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / zerodds-1.0.0rc7-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL zerodds-1.0.0rc7-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.5 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c4580b3288fdc309c08b21372bd7f160a800f99bdda04d88c5188c2e59c871b0
BLAKE2b-256 checksum
How to use checksums
d3ba8642b8e614939170ccc79f1fd57ee130673f9aa4fbd9c9d38699b2fbeb51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / zerodds-1.0.0rc7-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL zerodds-1.0.0rc7-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
34145eae86e03dc6b4e4c565ca1cdb1a5a348a1ed2b937c56305cf8f70746e3b
BLAKE2b-256 checksum
How to use checksums
4be8d420bcb20d3b59e706078220cf86a01b56cd2a2a4c9b000efbe5bec2813e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / zerodds-1.0.0rc7-cp38-abi3-macosx_11_0_arm64.whl

Download URL zerodds-1.0.0rc7-cp38-abi3-macosx_11_0_arm64.whl
Size 3.1 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
08c80498f5aaaa98fc0435d31873d821c2a385a82299d2a60a5c7b37425e0943
BLAKE2b-256 checksum
How to use checksums
a1bb50993885bb5bad842f6e159f5ea75d001dd754449d333221ed61b26f3699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for zerodds 1.0.0rc7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for zerodds-1.0.0rc7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page