Skip to main content

tet-py

PyPI Docs CI Python License

Python bindings for Tetration — mmap-friendly .tet tensors and the JSON/TOML query engine.

Install pip install tet-py → import tet
Docs docs.tetration.sh/python
Rust core tetration (linked at build time)
CLI tet binary from the main repo

Do not pip install tetration — that PyPI name is unrelated math code.

Quick start

pip install tet-py
python -c "import tet; print(tet.__version__, tet.core_version())"
import tet

with tet.open("data.tet") as f:
    print(f.mean("temperature"), f.quantile("temperature", 0.5))
    arr = f.read_numpy("temperature")                 # ram (memmap for full-width raw slabs)
    z = f.transform.to_numpy.zscore("temperature")  # transform → ndarray

More examples: Python quick start · operations · NumPy

Convert

tet.convert writes one .tet from a foreign file. .npy, multi-member .npz, and .csv / .tsv are in the core wheel. Other formats are optional extras: tet-py[h5], [netcdf], [zarr], [parquet], or [convert] for all of them.

Extra What it imports
(core) .npy (one dataset), .npz (every member), .csv / .tsv (numeric + category text columns)
h5 HDF5 datasets, groups as parent/child names
netcdf NetCDF variables, including groups
zarr Zarr v2 and v3 directory stores
parquet Parquet numeric columns and UTF-8 category columns

Compared with Rust tet convert: Python does not apply CF scale/offset, chunks the whole array unless you pass chunk_shape, and can read codecs the Rust importer skips when the extra library can decode them. Columns that are not layout-v1 numeric (or category text) are omitted.

Packages

tet.open("pkg.tet.d") reads the generation named by CURRENT (packed.tet). tet.ingest copies a sealed .tet into staging, and tet.publish seals those parts and updates CURRENT. See docs/operations.md.

Documentation

Topic Where
Install, API, NumPy sinks docs.tetration.sh/python
Query ops (local mirror) docs/operations.md
Release notes CHANGELOG.md
Format + query wire docs.tetration.sh · tetration repo
Roadmap docs.tetration.sh/roadmap

Develop

uv sync --extra dev
mise run develop          # or: uv run maturin develop
uv run pytest -q
uv run mypy python/tet

Requires Python 3.11+ and Rust 1.95+ (.mise.toml). Fixtures: tests/fixtures/.

License

MIT OR Apache-2.0, same as tetration.

Metadata

Release files for tet-py 0.2.2

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

Source distribution (sdist)

Source distribution for tet-py 0.2.2
File Size Uploaded
tet_py-0.2.2.tar.gz 54.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tet-py 0.2.2
File
tet_py-0.2.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
tet_py-0.2.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
tet_py-0.2.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
tet_py-0.2.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 abi3 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details

Total release size: 7.0 MB

Release files / tet_py-0.2.2.tar.gz

Download URL tet_py-0.2.2.tar.gz
Size 54.2 kB
Tags Source
SHA-256 checksum
How to use checksums
41d4cd634956380d6b12db974f5f1dd9ace5acc0396c21e968ac0dec0231a545
BLAKE2b-256 checksum
How to use checksums
3b239e32fe1706e22b94b66fb931899c0ce4d444bdf555df4626f9e4f7115007
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.2.2-cp311-abi3-win_amd64.whl

Download URL tet_py-0.2.2-cp311-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
cd1382c601a02bcd2472831736b361080afb8b89e60bd564c398902bce672473
BLAKE2b-256 checksum
How to use checksums
ed06b79ee5306de198e777a725f2252406b73a318b7bb3e2589fef0a9e1ba9a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.2.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tet_py-0.2.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1025160e86bd1495590f4b9709cf55d0c5599c399234f4df306683cdce31fcb7
BLAKE2b-256 checksum
How to use checksums
16511f9487852c97dd163be4a46e22c930b49b7b823027d007e30171365135a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.2.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tet_py-0.2.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
bfc2af56a969b6c2462eb50ca24e116a56a08ab11ce97cbdf4925f198ee8d0e9
BLAKE2b-256 checksum
How to use checksums
65dae3e174dd52cccce4e70cdd4c30b4089ca3523b57e7feae86cdcd129f18c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / tet_py-0.2.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL tet_py-0.2.2-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.7 MB
Tags CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a395faa2a624797dfa3b25eec8cf5f4cfba6380d96f5ecf3b3b14d9ae8cf47a5
BLAKE2b-256 checksum
How to use checksums
15c56775c87119ca230be62479ff19ee756fb245bccc3fedb61a0f089f190e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.2.3

5 release files

This release

0.2.2 This release

5 release files

0.2.1

5 release files

0.2.0

5 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