Skip to main content

openodd_py

ASAM OpenODD 1.0 for Python, on a Rust core.

  • Read an ODD from OpenODD YAML (taxonomy, modules, IMPORT, unit conversions) and a binding file saying how each concept is measured.

  • Judge values against it with OpenODD's three-valued, missing-value semantics, and work out which buckets of each attribute lie outside it.

  • Version it: an ODD's revision is the digest of the transmission it was read from (see docs/versioning.md), and the transmission packs into a deterministic archive the ODD reads back from exactly.

  • Cover what runs drive: CoverageCollector samples cover items and the ODD's attributes step by step (hits, seconds, metres, entries, min_stay, situations, steps outside the ODD) and writes a coverage file; merge_coverage / openodd-coverage merge any number into a report, and --export-cod writes each run's ODD samples as an OpenODD COD table (section 8.3) with its manifest and taxonomy.

  • Sample the next runs from the ODD (OddSampler), aimed at what coverage left uncovered.

What measures the attributes -- a simulator, a recorded log -- is the application's backend: a subclass of openodd.Backend naming its probes, how a run sets an attribute (knob), and where the ego is (position, geolocation). Everything else is this library's.

A default ODD ships with the package (openodd.bundled_odd(), python/openodd/odds/default): every attribute a road-vehicle simulator commonly measures, after ISO 34503, and no modules. Its binding names the probes a backend provides (ego_speed_kph, measure: vehicle_ahead_gap_m, ...); its revision changes only when its files do.

import openodd

backend = openodd.Backend(probes={"speed_kph": (read_speed, "km/h")})
odd = openodd.load_odd_binding("urban.yaml", backend=backend)
verdict = odd.evaluate(odd.sample(context))
odd.revision   # sha256 of the files it was read from
odd.archive()  # those files as a deterministic .tar.gz

collector = openodd.CoverageCollector(items, odd=odd, backend=backend)
collector.start(context, 0.0)
collector.tick(context, 0.05)  # after every step
collector.end(context, 0.05)
collector.write(Path("run_coverage.json"), "my_scenario")

Coverage

A coverage document records, besides each item's buckets, how a run spent its time across the ODD's buckets: OddCells adds up steps, seconds and metres per cell -- one bucket of each attribute, as its cover item buckets it -- so a consumer can slice runs by any attributes without the per-step values:

cells = openodd.OddCells(odd)
cells.add(values, seconds=dt, meters=ds)   # every step: each attribute's value
cells.to_dict()
# {"attributes": ["speed", "rain"], "rows": [[["[30, 60]", "heavy"], 812, 40.6, 588.2], ...]}

A missing value is <missing>, a number outside the buckets <below> / <above>. Each item's definition (describe()) names the measure its coverage is read from (amount: hits, counted.seconds, ...) and, for an ODD attribute's item, the attribute (attribute). openodd.__version__ is the installed version, for coverage files to say what wrote them.

Development

uv venv && uv pip install maturin pytest hypothesis pyyaml
maturin develop
cargo test && pytest

Releasing

Releases are cut by labels, as in simple_lanelet2. Put exactly one of release:major, release:minor or release:patch on a PR; when it is merged into main, the release workflow bumps the version in Cargo.toml and Cargo.lock with tools/bump_version.py, commits chore(release): vX.Y.Z and tags it, runs the tests again, builds the wheels (Linux x86_64/aarch64, macOS universal2, Windows x64) and the sdist, tests each wheel, and attaches them to a GitHub release with generated notes, and publishes them to PyPI with Trusted Publishing. A PR without a label releases nothing. The release label check runs on every PR: it creates any missing release:* label, fails if the PR carries more than one, and says in its summary which release the merge will cut.

A hand-pushed v* tag is built and published the same way (its version must match Cargo.toml), and running the workflow by hand builds everything without publishing.

Metadata

Release files for openodd-py 0.4.0

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

Source distribution (sdist)

Source distribution for openodd-py 0.4.0
File Size Uploaded
openodd_py-0.4.0.tar.gz 143.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for openodd-py 0.4.0
File
openodd_py-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
openodd_py-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
openodd_py-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
openodd_py-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.10 abi3 macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 9.3 MB

Release files / openodd_py-0.4.0.tar.gz

Download URL openodd_py-0.4.0.tar.gz
Size 143.5 kB
Tags Source
SHA-256 checksum
How to use checksums
96d6020174fd2a7a2b09dfe0a2fc669c34fc0c25d1f823c1d9f13c32870109fa
BLAKE2b-256 checksum
How to use checksums
bd9e301a57042ec5cc1ebcd442f914d4c71dcd883f47912f9e63c253deb3c024
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 12, 2026.

Transparency log

Release files / openodd_py-0.4.0-cp310-abi3-win_amd64.whl

Download URL openodd_py-0.4.0-cp310-abi3-win_amd64.whl
Size 1.7 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ec40eb9026c8cd412f68f09547cb1b832256a14cfd051ca0f0b016aa9cb75549
BLAKE2b-256 checksum
How to use checksums
904148ece2699806a677f5f22a65259184fe91915b0f1c78703f04e080b8664a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 12, 2026.

Transparency log

Release files / openodd_py-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL openodd_py-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
db28fe72c4fd00c37b2378aeb897d172c74daed626ff14c8029fff950f4df11c
BLAKE2b-256 checksum
How to use checksums
db74febba8de41d1462ecfbbf3cbfa0d9843b932568525e13911f9f5eedadbfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 12, 2026.

Transparency log

Release files / openodd_py-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL openodd_py-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1c907187620e7cc4529dac5d183914083b5d748967a5916a4463bd06c9c3790d
BLAKE2b-256 checksum
How to use checksums
ab005de405ae26adc229f23a39c4f808fa14c807c01e3acc61b7af8a0d04d28b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 12, 2026.

Transparency log

Release files / openodd_py-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL openodd_py-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 3.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
92db4381b9c8acd556e354cf443c0477e3403b6f71c60db465db48473975ef40
BLAKE2b-256 checksum
How to use checksums
2ba25bd8f618341018776ed28359212927bf339be4237b986eeba96d3a463830
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

5 release files

0.5.0

5 release files

This release

0.4.0 This release

5 release files

0.3.0

5 release files

0.2.2

5 release files

0.2.1

4 release files

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