Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

thadam

Python SDK for the Thadam edge capture runtime, built with PyO3 and maturin.

  • thadam.validate(path) — validate a pipeline configuration, returning every error and warning with positions and hints.
  • thadam.config_hash(path) — the stable configuration hash the runtime records in thadam.json.
  • thadam.read_segments(sink_dir, dataset=None) — read a Parquet sink's ready segments into a pyarrow.Table, zero-copy over the Arrow PyCapsule interface.
  • thadam.Pipeline(path) — build and run a pipeline in-process on a Rust-owned Tokio runtime, with the GIL released and graceful shutdown from another thread via stop().

Install

pip install thadam

To pin the current pre-release explicitly:

pip install thadam==0.1.0b2

Requires Python >= 3.9; pyarrow >= 14 is installed as a dependency. Prebuilt abi3 wheels (CPython 3.9+) are published for Linux glibc (manylinux_2_28) and musl (musllinux_1_2) on x86_64 and aarch64, and for macOS arm64 (11.0+) and x86_64. Other platforms (such as Windows) build from the source distribution and need a Rust toolchain (1.89 or newer).

This package is the Python SDK; the thadam command-line tool installs with cargo install thadam --version 0.1.0-beta.2 --locked.

Examples

Validate a configuration

import thadam

for d in thadam.validate("pipeline.yaml"):
    where = f":{d.line}:{d.column}" if d.line else ""
    print(f"{d.severity}[{d.code}] {d.path}{where}: {d.message}")
    if d.hint:
        print(f"  hint: {d.hint}")

The configuration hash

assert thadam.config_hash("pipeline.yaml") == "1734a596e8a251683f1e829377f1e2c5"

Read a Parquet sink

table = thadam.read_segments("/var/lib/thadam/sinks/local", dataset="readings")
print(table.schema)
print(table.num_rows)
df = table.to_pandas()

read_segments lists files through the sink's catalog.log when one exists (every record that still has a file on disk, oldest WAL range first) or walks ready/ directly when there is no catalog (fixtures, copied-out data). All files must share a schema — they do when one sink wrote them.

Run a pipeline in-process

import threading

import thadam

pipeline = thadam.Pipeline("pipeline.yaml")
t = threading.Thread(target=lambda: print("exit", pipeline.run(timeout=300)), daemon=True)
t.start()
# ... other work ...
pipeline.stop()   # graceful shutdown, like SIGINT to the CLI
t.join()
exit_code = pipeline.run(timeout=300)  # raises: a Pipeline runs once

run(timeout=seconds) triggers graceful shutdown when the timeout elapses (the shutdown deadline then bounds the drain); it is not a hard kill. Exit codes mirror the CLI: 0 clean, 1 runtime failure, 2 invalid configuration, 3 data directory, 130 interrupted.

Catching errors

try:
    h = thadam.config_hash("missing.yaml")
except thadam.ThadamError as e:
    print(e.code, e.domain)  # config.invalid config
    print(e.message)

Building from a checkout

For contributors working on the SDK from a checkout of the Thadam repository, building from source requires the workspace Rust toolchain (rust-toolchain.toml) and a CPython >= 3.9 build on PATH (PYO3_PYTHON to pick a specific one):

cd sdk/python
python3 -m venv .venv
. .venv/bin/activate
pip install maturin pytest pyarrow
maturin develop
pytest tests

maturin develop builds the thadam._native cdylib with pyo3/extension-module (no libpython linked) and installs the package in the virtualenv. Cargo's plain cargo test -p thadam-python builds without that feature (rlib + libpython) so the Rust unit tests run too.

Arrow versions

The workspace writes segments with arrow/parquet 60, while pyo3-arrow 0.19 (the newest release) pairs with arrow 59 — no release tracks arrow 60 yet. read_segments therefore opens the Parquet files itself with parquet 59 and hands the batches to pyo3-arrow; the decode types never cross between majors, and the Python-side transfer stays zero-copy through the Arrow C stream capsule. When pyo3-arrow publishes an arrow-60 release this constraint goes away. One wheel per platform covers all supported Pythons via PyO3's abi3 (abi3-py39); pyo3-arrow's capsule and buffer-protocol APIs are stable-ABI-safe.

Layout

sdk/python/
  Cargo.toml            Rust crate `thadam-python`, cdylib `thadam`
  pyproject.toml        maturin build, Python >= 3.9, abi3 wheel
  src/                  PyO3 bindings and Rust unit tests
  python/thadam/         pure-Python package (re-exports, .pyi stubs, py.typed)
  tests/                pytest suite (run inside a venv, see above)

Metadata

Release files for thadam 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thadam 0.1.0b2
File Size Uploaded Provenance Actions
thadam-0.1.0b2.tar.gz 1.0 MB With provenance Details for thadam-0.1.0b2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for thadam 0.1.0b2
File Actions
thadam-0.1.0b2-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for thadam-0.1.0b2-cp39-abi3-musllinux_1_2_x86_64.whl
thadam-0.1.0b2-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for thadam-0.1.0b2-cp39-abi3-musllinux_1_2_aarch64.whl
thadam-0.1.0b2-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for thadam-0.1.0b2-cp39-abi3-manylinux_2_28_x86_64.whl
thadam-0.1.0b2-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for thadam-0.1.0b2-cp39-abi3-manylinux_2_28_aarch64.whl
thadam-0.1.0b2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for thadam-0.1.0b2-cp39-abi3-macosx_11_0_arm64.whl
thadam-0.1.0b2-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for thadam-0.1.0b2-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 174.9 MB

Release files / thadam-0.1.0b2.tar.gz

Download URL thadam-0.1.0b2.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
13527d81bd03a8a689164566f25521e8efdae9027ab866f81a3bf9a280391b78
BLAKE2b-256 checksum
How to use checksums
f5584b9f55100bf3856130cf70921a64e650093c054dbc7389bff60ca02575f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL thadam-0.1.0b2-cp39-abi3-musllinux_1_2_x86_64.whl
Size 37.3 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
2d143ab07cd0147056d3fe7eaed58f8bbd3a0a216f6fd0fcb7b7aa04e24a3cbf
BLAKE2b-256 checksum
How to use checksums
49b8c54b6574d230fec2c20884b47366c4b43f744416aac3affcb5ae4cf572a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL thadam-0.1.0b2-cp39-abi3-musllinux_1_2_aarch64.whl
Size 37.0 MB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
444305705bfb77774ab6992ff5e06bfa5d3ca86244f78193fc95afaae0d11849
BLAKE2b-256 checksum
How to use checksums
9cf792a4206e21d66499f5a9c1e0de565cfedf5069882c467300e447c89e4456
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL thadam-0.1.0b2-cp39-abi3-manylinux_2_28_x86_64.whl
Size 38.8 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
81af82a6708a15372aa31f7413c29d237abfd3bae38936fd6cd1db50cd53e80e
BLAKE2b-256 checksum
How to use checksums
a97a764340f3be47a7e3ed557fac75f6c142266f684eb5bfba7e28bdf2bfb493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL thadam-0.1.0b2-cp39-abi3-manylinux_2_28_aarch64.whl
Size 36.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
352651067c218f908a5e068c14b220117c3c890bec25236ff9273a26f53215d6
BLAKE2b-256 checksum
How to use checksums
5e4b94743e1d3048de60e41d7125b748df02d88ca2806f926eafd3ae0c7e9fcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-macosx_11_0_arm64.whl

Download URL thadam-0.1.0b2-cp39-abi3-macosx_11_0_arm64.whl
Size 11.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fa4c95e52ea22e34a48ba3542f199622498c0bc8e0076c5c8c510030ee121cd7
BLAKE2b-256 checksum
How to use checksums
23c9efe1b4182d5e310d73eb6786328a9130f2f490238e7d80f99900a03940e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Release files / thadam-0.1.0b2-cp39-abi3-macosx_10_12_x86_64.whl

Download URL thadam-0.1.0b2-cp39-abi3-macosx_10_12_x86_64.whl
Size 12.7 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5d7afd381b51014e0133e2e980fd9c64eab21a27f4145ada2c39127901655ff8
BLAKE2b-256 checksum
How to use checksums
f08f2be632313e6347370c15efba3ae74dde2253a891a53201a0d86c0ea9a5a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 25, 2026.

Transparency log

Security for thadam 0.1.0b2

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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for thadam-0.1.0b2.tar.gz

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 25, 2026.

Transparency log

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