Skip to main content

tdmread

Read NI TDM/TDX measurement files (an XML .tdm header plus a binary .tdx data file, as written by LabVIEW, DIAdem and other NI software) in plain Python: no dependencies, nothing to compile, fully typed.

Install

pip install tdmread

Python 3.10 or newer. NumPy is optional (pip install tdmread[numpy] for Channel.to_numpy()).

Quick start

from tdmread import read_tdm

dataset = read_tdm("measurement.tdm")  # the .tdx is found through the header

for group in dataset:
    print(group.name)
    for channel in group:
        print(f"  {channel.name} [{channel.unit}] {channel.datatype}: {len(channel)} values")

voltage = dataset.group("Measurements").channel("voltage")
print(voltage.data[:5])  # a tuple of numbers, strings or datetimes
print(voltage.properties.get("wf_increment"))  # custom properties, typed
print(sum(voltage.numbers()))  # typed view for type checkers

Every channel carries its name, unit, description, datatype (DT_DOUBLE, ...), the .tdx value_type, the sequence representation, the header minimum and maximum, its custom properties, and data: numbers (int for integer types), strings, or naive datetime values for time channels. The dataset and each group have properties too, and dataset.metadata holds the root name, title, description, author and datetime.

What is read, all checked against NI's own reader (see GUIDE.md):

  • Every numeric .tdx value type (8 to 64-bit integers, signed and unsigned, 32 and 64-bit floats) in both byte orders, and 16-byte time values.
  • Values written inline in the header: numbers, strings and times.
  • implicit_linear and implicit_constant channels (generated, no .tdx needed) and raw_linear / raw_linear_external scaled channels.
  • Interleaved block_bm layouts.

Anything else (for example strings stored in the .tdx, block_mr layouts or implicit_saw) raises UnsupportedTdmError instead of returning wrong numbers.

Command line

tdmread info measurement.tdm
tdmread channels measurement.tdm
tdmread dump measurement.tdm --group Amplitudes --channel "A = 1" --format csv
tdmread dump measurement.tdm -g Amplitudes -c "A = 1" -f json -o values.json

info prints the dataset metadata and a group summary, channels lists every channel with its type and length, and dump writes one channel as CSV or JSON (UTF-8). Errors go to standard error with exit code 1; usage errors exit with 2. python -m tdmread works too.

Why

npTDMS reads the newer .tdms format but not the .tdm/.tdx pair. Two packages do read .tdm/.tdx, each with weight: tdm-loader depends on NumPy, and TDMtermite ships a compiled C++ extension. tdmread is a small, fully typed reader with no runtime dependencies and nothing to build, whose behaviour is pinned by tests against files LabVIEW 2026 wrote and against NI's own reading of them.

More

License

MIT. See LICENSE.

Metadata

Release files for tdmread 1.0.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 tdmread 1.0.0
File Size Uploaded Provenance Actions
tdmread-1.0.0.tar.gz 224.2 kB Without provenance Details for tdmread-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 253.9 kB

Release files / tdmread-1.0.0.tar.gz

Download URL tdmread-1.0.0.tar.gz
Size 224.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebbd84a939e985be9692bcb8a794ada41a47b749c1509e6fa54cac6db0222f6b
BLAKE2b-256 checksum
How to use checksums
eebce49f738ea9578c90ee8b502f09a8667682e4954d6558ea586a88ba33afa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / tdmread-1.0.0-py3-none-any.whl

Download URL tdmread-1.0.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dce1005749c12e6365839ed5924b12120daa5cf3f1d086d9aebff51352c71f41
BLAKE2b-256 checksum
How to use checksums
cabebfe768717d9e53c946a82506559b33582929254bc82ac32a99ac7c12a467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Security for tdmread 1.0.0

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