skillfed

ldfparser

LDF Language support for Python

ldfparser v0.26.0 1.4M downloads/30d#3,953 on PyPI86
Permissive license MIT AGING released

What it is and what it does

ldfparser reads LIN Description Files and extracts their signal and frame metadata, then uses those definitions to encode raw signal values into binary messages and decode binary messages back into signal dictionaries. It implements the LIN protocol standards (1.3, 2.0, 2.1, 2.2A) and provides both programmatic and command-line interfaces for working with LDF files.

The package depends on lark for parsing, bitstruct for bit-level encoding/decoding, and jinja2 for templating. It is designed for automotive and embedded systems work where LIN bus communication requires translating between human-readable signal names and their binary representations. The library is still pre-release, so breaking changes can occur between minor versions; production use should pin to a specific version and test before upgrading.

Use it for:

  • Decode raw CAN/LIN bus messages captured from a vehicle into human-readable signal values for analysis or logging.
  • Encode signal commands (e.g., motor RPM, fan state) into binary frames for transmission over a LIN bus.
  • Extract signal definitions and metadata from LDF files to build protocol documentation or validation tools.
  • Validate LDF file syntax and semantic correctness before using it in production automotive systems.
  • Automate conversion between LDF and other formats (e.g., JSON) for integration with external tools.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses LIN Description Files (LDF) to extract signal and frame definitions, and encodes/decodes messages according to those definitions.

Yes, if you work with LIN bus protocols and LDF files in automotive or embedded contexts. The package has low install friction, permissive licensing, and no known vulnerabilities. However, be aware that maintenance is aging (last release 564 days ago) and the library is pre-release, so pin versions in production and test upgrades carefully. Not relevant for general-purpose Python development.

Install

ldfparser on PyPI

pip

pip install ldfparser

uv

uv add ldfparser

poetry

poetry add ldfparser

Installing ldfparser

Before you install

Low install friction with three straightforward dependencies (lark, bitstruct, jinja2). Maintenance status is aging—last release was 564 days ago—so expect slower response to issues, though the repository remains active and not archived.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the original license notice.

Quickstart

pip install ldfparser

import ldfparser
ldf = ldfparser.parse_ldf(path="network.ldf")
frame = ldf.get_unconditional_frame('Frame_1')
message = frame.encode_raw({"Signal_1": 123, "Signal_2": 0})

Requires a valid LDF file; the library is in pre-release state, so breaking changes may occur between minor versions—pin to exact version in production.

Verify before relying

  • Whether the library successfully parses all real-world LDF files that conform to LIN 1.3, 2.0, 2.1, or 2.2A standards, or if compatibility gaps remain.
  • Current state of checksum calculation for frames (listed as a known missing feature in the description).
  • Stability and completeness of the experimental LDF save-to-file feature.

Package facts

License MIT (permissive)
Python support supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,<4)
Install friction low — pure-Python wheel
Runtime dependencies 3 — lark, bitstruct, jinja2
Maintenance aging — 564 days since the last release
Last repo commit
First released
Downloads 1,399,749/month — #3,953 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ldfparser-0.26.0-py3-none-any.whl

Keywords: LIN, LDF

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

LIN protocol parsingLDF file parserautomotive message encoding decodingLIN signal extractionframe definition parserLIN bus protocolmessage encode decode
automotiveprotocol-parsingembedded-systems

More Software Development packages