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_linearandimplicit_constantchannels (generated, no .tdx needed) andraw_linear/raw_linear_externalscaled channels.- Interleaved
block_bmlayouts.
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
- GUIDE.md: the format rules, errors, limits, and upgrading from 0.2.
- CHANGELOG.md
License
MIT. See LICENSE.
Links
- Website: https://lianes8studio.com
- GitHub: https://github.com/JaviLianes8
- LinkedIn: https://www.linkedin.com/in/jlianes/
Metadata
Release files for tdmread 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tdmread-1.0.1.tar.gz | 224.5 kB | Without provenance | Details for tdmread-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tdmread-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for tdmread-1.0.1-py3-none-any.whl |
Total release size: 254.4 kB
Release files / tdmread-1.0.1.tar.gz
| Download URL | tdmread-1.0.1.tar.gz |
|---|---|
| Size | 224.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd6d80f28c581ba45fca76dde546bce41c90c470118dd12f9891d8005ca93346
|
|
BLAKE2b-256 checksum How to use checksums |
42f4568420b0333ea5f01948cbdd3d47f8b52bf01500288c58b6d3e3b5d075fd
|
| 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.1-py3-none-any.whl
| Download URL | tdmread-1.0.1-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c1fecbcbfc8b8541dcc9545540937a33f924cc3ec75a16b1a23535d1ced2365
|
|
BLAKE2b-256 checksum How to use checksums |
3e883cbb60b1f403d44b80d91dc457cdba4c978a5b731a7865f7d738763a2b3f
|
| 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.1
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.