Skip to main content

py-a2lfile

CI license

py-a2lfile is a Python wrapper around the Rust crate a2lfile. It provides a small, read-only API for loading and inspecting A2L files from Python while relying on the upstream Rust implementation for parsing performance and stability.

Current Capabilities

  • Parse A2L content from a file path with a2lfile.load(...)
  • Parse A2L content directly from a string with a2lfile.load_from_string(...)
  • Inspect modules and measurements through a small, read-only Python API
  • Access conversion metadata including COMPU_METHOD, COMPU_TAB, COMPU_VTAB, and COMPU_VTAB_RANGE
  • Resolve references from measurements to conversion tables and engineering units
  • Inspect module-level metadata such as MOD_COMMON, MOD_PAR, and unit definitions
  • Traverse generic IF_DATA, including tagged structures used for XCP-oriented extraction
  • Access detailed measurement metadata such as annotations, bit operations, addresses, refresh information, symbol links, and virtual channels
  • Stable and fast parsing backed by the Rust a2lfile library
  • Typed distribution with _a2lfile.pyi and py.typed
  • Supports CPython 3.12, 3.13, and 3.14 using stable ABI (abi3) wheels

Limitations

  • Parse-only API; this package does not currently provide editing or write-back support
  • Intentionally small wrapper surface focused on inspection rather than full ASAP2 authoring workflows
  • Free-threaded Python builds are not covered by the published abi3 wheels

Installation

pip install py-a2lfile

The package is installed from PyPI as py-a2lfile, but imported in Python as a2lfile.

Releases provide a single cp312-abi3 wheel per platform for standard CPython 3.12–3.14 on Linux x86_64, Linux aarch64, and Windows x64. Other platforms require a source build with Rust installed.

Example

import a2lfile

a2l = a2lfile.load("example.a2l")

for module in a2l.modules:
    print(module.name)
    for measurement in module.measurements:
        print(" ", measurement.name, measurement.conversion)

Development

uv sync --dev --python python3.12
uv run maturin develop --uv
uv run pytest

Acknowledgements

This package is a Python wrapper around the Rust crate a2lfile.

Credit for the underlying A2L parsing implementation belongs to the a2lfile authors and maintainers. This wrapper exists to make that parser available from Python, because a2lfile was the most capable and well-maintained A2L parser identified for this use case.

License

Licensed under either of:

Metadata

Release files for py-a2lfile 0.0.10

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

Source distribution (sdist)

Source distribution for py-a2lfile 0.0.10
File Size Uploaded Provenance Actions
py_a2lfile-0.0.10.tar.gz 29.9 kB Without provenance Details for py_a2lfile-0.0.10.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for py-a2lfile 0.0.10
File Interpreter ABI Platform Actions
py_a2lfile-0.0.10-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for py_a2lfile-0.0.10-cp312-abi3-win_amd64.whl
py_a2lfile-0.0.10-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for py_a2lfile-0.0.10-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
py_a2lfile-0.0.10-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for py_a2lfile-0.0.10-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Total release size: 2.2 MB

Release files / py_a2lfile-0.0.10.tar.gz

Download URL py_a2lfile-0.0.10.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
939e7056fcf3a2f12da44c68f06a07badfe8a9601847c1854d346b2a32a2d156
BLAKE2b-256 checksum
How to use checksums
38177de5c334629abd966f011815904d03b6ea1c5ab8d74815cfcd60a4139508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py_a2lfile-0.0.10-cp312-abi3-win_amd64.whl

Download URL py_a2lfile-0.0.10-cp312-abi3-win_amd64.whl
Size 628.4 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fa42bb6813613b1e7bec87423f1e781f8413c015adbfe769815871939b3b5b3f
BLAKE2b-256 checksum
How to use checksums
6304b9919924e1bbe1fe535e0cd001e14f8bd4daacabdc482aa5a9edc1ec8b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py_a2lfile-0.0.10-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL py_a2lfile-0.0.10-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 813.9 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ea00c6928cc85d097f16ca253c88a63315dab8678f1bd9c797f5940871337858
BLAKE2b-256 checksum
How to use checksums
cf0d03a87ef3854ab9fe4d23ce21a73b072d745cd67781b91e7f6ca5aca6fbfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py_a2lfile-0.0.10-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL py_a2lfile-0.0.10-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 761.3 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
9bbc0d3fd05c0cbfa6582ce8c513bd786e59a39e0fac83f96587beda03fec07c
BLAKE2b-256 checksum
How to use checksums
93981c6747174c4ee9add8e1f4ac61ed4d2df36f33892fe62d85b2bcbf42ad62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for py-a2lfile 0.0.10

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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