PyOpenDrive
PyOpenDrive is a Python library for reading ASAM OpenDRIVE road network files.
Current support
The initial parser reads the OpenDRIVE format revision, common header metadata, and road identifiers, lengths, junction references, and names. It does not yet parse road geometry, lanes, signals, or other nested elements, and it does not validate documents against the ASAM XSD schemas.
Usage
from pyopendrive import OpenDriveMap
road_network = OpenDriveMap.load("map.xodr")
print(road_network.format_version)
for road in road_network.roads:
print(road.id, road.length)
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_network.diagnostics.
Package layout
pyopendrive/odr/models/contains the public domain objects.pyopendrive/odr/parser/contains the XML-to-model conversion and parse errors.pyopendriveexposes the loading facade and model types directly.
Development
uv sync
uv run ruff check .
uv run ruff format --check .
Metadata
Release files for pyopendrive 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyopendrive-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pyopendrive-0.1.0-py3-none-any.whl
| Download URL | pyopendrive-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e363762ed98b5ea1a08e70f315c97a890d4e054e0d6d397105206f1dbd88101
|
|
BLAKE2b-256 checksum How to use checksums |
9f1d9ab569577afb5e3d341e142a23bb5e6f69052f2ab598549bf97ed34e0e4d
|
| 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 Sep 30, 2026.
Transparency log