stdf-convert
Read STDF V4 and V4-2007 semiconductor test data files as Arrow tables, one per record type.
Parsing is done in Rust by rust-stdf.
import stdf_convert
tables = stdf_convert.tables("results.stdf.gz") # {"FAR": pyarrow.Table, "PIR": ..., "PTR": ...}
ptr = stdf_convert.tables("results.stdf.gz", ["PIR", "PTR", "PRR"])["PTR"]
for record_type, batch in stdf_convert.batches("results.stdf.gz", batch_size=65_536):
... # for files too large to hold at once
stdf_convert.schema("PTR") # the schema, without reading a file
Both tables and batches parse the file in Rust without holding the GIL. Gzip (.gz),
bzip2 (.bz2) and zip (.zip, first member) files are read directly. Errors raise
stdf_convert.StdfError; an unknown record type in a filter raises ValueError.
Installing the package also installs the stdf-convert command, which converts files to
JSON Lines (stdf-convert --help), or run it without installing: uvx stdf-convert results.stdf.
Tables
Every table starts with the record's position and header, then has one column per record field, in specification order:
| Column | Type | |
|---|---|---|
sequence_number |
uint64 |
position of the record in the file (unaffected by filtering) |
byte_offset |
uint64 |
offset of the record header in the decompressed stream |
rec_len, rec_typ, rec_sub |
uint16, uint8, uint8 |
the record header |
TEST_NUM, ... |
see below | the record's fields |
The schema comes from the STDF type rust-stdf declares each field with (kept in the field
metadata as stdf_type), so it is the same for every file, whatever values the file holds:
| STDF | Arrow |
|---|---|
U1, U2, U4, U8 / I1, I2, I4 / R4 |
uint8 ... uint64 / int8 ... int32 / float32 |
C1, Cn, Sn |
string: UTF-8 when the bytes are valid UTF-8, otherwise Latin-1 |
B1, Bn |
binary |
Dn (bit fields) |
struct<bit_count: uint16, bit_data: binary> |
KxU1, KxN1, KxU2, KxR4, KxCn, ... |
list of the item type |
KxUf (STR) |
list<uint64>; the *_SIZE fields give the width in the file |
GDR.GEN_DATA |
list<struct>: TYPE (U1, Cn, B0, ...) and a column per type |
Optional fields are nullable and null only where the record left them out; NaN stays NaN.
Records outside the specification are kept: RESERVED (types 180 and 181) and UNKNOWN
(unknown types), each with TYP, SUB, BYTE_ORDER and its payload as RAW_DATA.
Record order across tables is given by sequence_number, e.g. to find each result's part:
import duckdb
con = duckdb.connect()
for record_type, t in stdf_convert.tables("results.stdf.gz").items():
con.execute(f"CREATE TABLE {record_type.lower()} AS SELECT * FROM t")
con.sql("""
SELECT pir.sequence_number AS part_start, ptr.*
FROM ptr ASOF JOIN pir
ON ptr.HEAD_NUM = pir.HEAD_NUM AND ptr.SITE_NUM = pir.SITE_NUM
AND ptr.sequence_number > pir.sequence_number
""")
Development
cd python
uv venv && uv pip install maturin pytest duckdb
uv run maturin develop --release
uv run pytest
Metadata
Release files for stdf-convert 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stdf_convert-0.2.0.tar.gz | 52.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| stdf_convert-0.2.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| stdf_convert-0.2.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| stdf_convert-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 16.9 MB
Release files / stdf_convert-0.2.0.tar.gz
| Download URL | stdf_convert-0.2.0.tar.gz |
|---|---|
| Size | 52.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
602f5109fd484278dfaa6676a57245fae3b18f9f9d1049c558416e04baf09454
|
|
BLAKE2b-256 checksum How to use checksums |
29d7fa12fe41e9a1bbb1f4f7ea82c782c89c2710980949d711d61b053928ee6b
|
| 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 29, 2026.
Transparency logRelease files / stdf_convert-0.2.0-cp311-abi3-win_amd64.whl
| Download URL | stdf_convert-0.2.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
816dbf85161f5618e9e421575a06738648e7e0e0797fb33643c6db5da1e1908a
|
|
BLAKE2b-256 checksum How to use checksums |
612021eba3f4253a6807cbb8338bd441d3e650ebff597444c7910db3e80517a4
|
| 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 29, 2026.
Transparency logRelease files / stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fe89eac09729571de23832b9267d4e8f4acace8033e1d55c69c8d071e5346f25
|
|
BLAKE2b-256 checksum How to use checksums |
c81eb51d115f22f56f848122637016a7edb4c5ffdb465dc2c44cc12a6acb180c
|
| 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 29, 2026.
Transparency logRelease files / stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | stdf_convert-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
9a8ea87a26f7040aa930f36248b3a269025a0bfd0a2d286b90d7cc0eef5216f9
|
|
BLAKE2b-256 checksum How to use checksums |
3e775f36a68e09383e908c3fb9a32996b2dc44fd65ca83cf7fcdbdedc3ae6cc8
|
| 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 29, 2026.
Transparency logRelease files / stdf_convert-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | stdf_convert-0.2.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1695cdddfdf8f642c1242bd1af548ca54a12588044fd692ce9010ca6241c2bf4
|
|
BLAKE2b-256 checksum How to use checksums |
daba9022547aae93b5d4e443fe335a4c14ba887079393e5a690ef857bec5cfe1
|
| 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 29, 2026.
Transparency logRelease files / stdf_convert-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | stdf_convert-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c74ecdc2bf233172b99c9436e85af07dbdf2978e14282795579448a4d995460
|
|
BLAKE2b-256 checksum How to use checksums |
010b330e1e44daa4378208c8b3bf32b5791d32a1cb265739de73f5e387aab95d
|
| 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 29, 2026.
Transparency log