Skip to main content

PyOpenDrive

PyOpenDrive is a Python library for reading ASAM OpenDRIVE road network files.

Current support

The parser reads the OpenDRIVE format revision, header metadata, road attributes and links, road types, plan-view geometry, elevation and lateral profiles, lane layers with supported lane properties, and selected junction, controller, signal, and object records. The models preserve source geometry parameters. The loader does not evaluate curves or validate documents against the ASAM XSD schemas.

See COMPATIBILITY.md for precise feature coverage and version limits, and ROADMAP.md for remaining work.

Usage

from pyopendrive import OpenDriveMap

road_map = OpenDriveMap.load("map.xodr")
print(road_map.format_version)
for road in road_map.roads:
    print(road.id, road.length)
    for signal in road.signals:
        print(signal.id, signal.type, signal.subtype)
for junction in road_map.junctions:
    print(junction.id, len(junction.connections))

OpenDriveMap.load accepts filesystem paths and caller-owned text or binary streams. Caller-owned streams remain open. OpenDrive remains available as a compatibility alias. Successful parsing reads supported fields but does not imply complete XSD or semantic validation. Recoverable unsupported content is reported through structured values in road_map.diagnostics.

Package layout

  • pyopendrive/odr/models/ contains the public domain objects.
  • pyopendrive/odr/parser/ contains the XML-to-model conversion and parse errors.
  • pyopendrive exposes the loading facade and model types directly.

Development

uv sync
uv run --locked ruff check .
uv run --locked ruff format --check .
uv run --locked python tests/fetch_testdata.py
uv run --locked pytest

CI runs these checks on Python 3.12, 3.13, and 3.14. It also builds and installs both the wheel and source distribution, then checks their public loading API.

Metadata

Release files for pyopendrive 0.2.0

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

Built distribution (wheel)

Table of built distributions (wheels) for pyopendrive 0.2.0
File Interpreter ABI Platform
pyopendrive-0.2.0-py3-none-any.whl Python 3 none any Details

Release files / pyopendrive-0.2.0-py3-none-any.whl

Download URL pyopendrive-0.2.0-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3178810e1826e3924dc6f11c0d681b55bca8eedf188cc1fd605a5d4b563a0af9
BLAKE2b-256 checksum
How to use checksums
bce069bfd3f8f51c3686c8d89a38b9b232e34269295553ca9fc7758daed65494
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.3

1 release file

0.1.0

1 release file

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