Skip to main content

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.

VUR has UPD_CNT (uint8) and UPD_NAM (list<string>), for both layouts in use: the V4-2007 specification's single name (UPD_CNT null), and the later count and array of names, e.g. 2, ["V4-2007", "Scan:2007.1"]. A VUR that is neither is an error.

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.3.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 stdf-convert 0.3.0
File Size Uploaded
stdf_convert-0.3.0.tar.gz 55.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for stdf-convert 0.3.0
File
stdf_convert-0.3.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
stdf_convert-0.3.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.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
stdf_convert-0.3.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
stdf_convert-0.3.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.3.0.tar.gz

Download URL stdf_convert-0.3.0.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
989f0c8dbe16fc8a3fac473e026341c52d4947a5fdcd1533e4e03958f5ef3648
BLAKE2b-256 checksum
How to use checksums
c2e15731fcbb069f4e51d1e5829806cc701e676f8f49e82fd1ef509fba70edde
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 Oct 8, 2026.

Transparency log

Release files / stdf_convert-0.3.0-cp311-abi3-win_amd64.whl

Download URL stdf_convert-0.3.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
b38e2c27e47934638e45cd60fdc0282c9c23d4b82d7037bedec492b9ff68f393
BLAKE2b-256 checksum
How to use checksums
87dd100efa09b403a4e2401bb56ff615edffc7d50c369d0c0fad2b588c048f62
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 Oct 8, 2026.

Transparency log

Release files / stdf_convert-0.3.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL stdf_convert-0.3.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
bfb982c02d29dfbb03341a9ab0ac8c8b92f8d523586606046e2dd755e483f5d0
BLAKE2b-256 checksum
How to use checksums
be135d7281edbfd77c2c61527402a9b7312ea934d842fd16e0a9e3a752ebd3dc
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 Oct 8, 2026.

Transparency log

Release files / stdf_convert-0.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL stdf_convert-0.3.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
3717cc338959bfd0b1bf86174f294b96c4c0c50f56b8adb589a2742d145c1f54
BLAKE2b-256 checksum
How to use checksums
c3e6595314c04ed1c43bf18d5db097f31a781a97f0de816ba98a0cd2b1561ba0
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 Oct 8, 2026.

Transparency log

Release files / stdf_convert-0.3.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL stdf_convert-0.3.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
27646566aab6814f2078b65038d314b5a4cc3f55b69e562bd9c760b8232bfa02
BLAKE2b-256 checksum
How to use checksums
9924a643ec250372c65883188b974395fe314193e3b0fc7ff9a24af418ba3108
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 Oct 8, 2026.

Transparency log

Release files / stdf_convert-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL stdf_convert-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
faacf8c363303246768800c57f6962792ca130e119e93e8f30ab188f8eb9ab52
BLAKE2b-256 checksum
How to use checksums
610d729199a5985784f54a8c7ba39fe3836413bf6c145b3bfbce02a7ec3affbb
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 Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

6 release files

0.2.0

6 release files

0.1.0

6 release files

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