Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.3.8 instead.

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.

src may be s3://bucket/object.ext. That downloads the whole object (TETRATION_S3_ENDPOINT, plus the usual access key / secret / region), writes a temp file, and uses the same importer. Zarr prefixes are not read from S3.

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.

Export

tet.export (and TetFile.export) writes a .tet to HDF5, NetCDF, or Zarr. Same optional extras as convert ([h5], [netcdf], [zarr], or [export] for those three). Dense numeric datasets only; carries dim_names and basic string attrs when present. Values are densified via read_numpy — prefer Rust tet export when you need native HDF5/NetCDF or chunk-preserving Zarr.

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.

For an S3-compatible backend:

from tet import S3Store

store = S3Store.connect(endpoint="http://127.0.0.1:9000", bucket="…",
                        access_key_id="…", secret_access_key="…", prefix="demo")
store.ingest("part.tet", session_id="s0")
store.publish(["part"])
f = store.open("current")  # pin; later publish does not retarget f

Endpoint and credentials are arguments (not in the URI). 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.3.3

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.3.3
File Size Uploaded
tet_py-0.3.3.tar.gz 73.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tet-py 0.3.3
File
tet_py-0.3.3-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
tet_py-0.3.3-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.3.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
tet_py-0.3.3-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: 25.9 MB

Release files / tet_py-0.3.3.tar.gz

Download URL tet_py-0.3.3.tar.gz
Size 73.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bca219b5dbd02f4381c85703a97221d0bba1acee0b347a5bed15fadfba77e288
BLAKE2b-256 checksum
How to use checksums
de76eaab747011a706d4cef36234e5afb0706ffb9bc470fe0ae3cc23bea165b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

Download URL tet_py-0.3.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 9.9 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
ab516357c56226740e802bf8eb1848742faeb3cb54e066ca2777f479f306bb57
BLAKE2b-256 checksum
How to use checksums
b8ec16d4da3f07af69e8bd14c33a66f32654d8df8d7a01dd56a35a2fa6f73ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0
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