keyten
Python bindings for Keyten, a tiny columnar dataframe engine with compressed blocks and a lazy query optimizer.
Queries stay lazy until collect(), then run entirely in the engine with the GIL released — predicate and projection pushdown, vectorized parallel execution, disk spilling for data bigger than memory, and native-table I/O all happen outside the interpreter.
Install
Keyten currently supports 64-bit Linux and CPython 3.11 or newer:
pip install keyten
A first query
import keyten as kt
trades = kt.DataFrame([
kt.Series.string("sym", ["a", "b", "a", "b"]),
kt.Series.int("qty", [1, 2, 3, 4]),
])
result = (
trades.lazy()
.filter(kt.col("qty") > 1)
.with_columns((kt.col("qty") * 10).alias("q10"))
.group_by("sym")
.agg([
kt.col("q10").sum(),
kt.col("qty").count().alias("n"),
])
.sort("sym")
.collect()
)
print(result)
What's in the box
- Expressions — arithmetic, comparisons, boolean logic, casts, string operations (substring, regex extract), value recoding, null/NaN shaping, and conditional
if_else. - Aggregations —
sum/min/max/mean/count/first/last/std/median/n_uniqueand pairwisecorr, per group or whole-frame. - Windows —
cum_sum,shift,diff,rolling_mean,forward_fill, andover(...)partitioned evaluation. - Joins — inner, left, semi, anti, and a time-series backward asof join with by-groups.
- Temporal kinds — dates, timestamps, and times are first-class, parse straight from CSV, and ride the integer encodings.
- Sources —
scan_csv(strict typed inference),scan_parquet(files or directories, statistics-pruned), andscan_native, the engine's own zero-copy, crash-safe table format. - Scale — out-of-core execution against a self-derived memory budget; nothing to configure.
The package ships typed stubs (py.typed), so editors and type checkers see the full API with docstrings.
Documentation
Tutorials, the full API reference, and engine internals live at k10.works/docs.
License
Licensed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyten-0.1.34-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: keyten-0.1.34-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9426527e52923f732bd678f8c97c309043d984fea308dd995cd004a09c9d7190
|
|
| MD5 |
3e3e8dcf594126e4b3e39fba60b44bce
|
|
| BLAKE2b-256 |
acf1bf19767a14681537aaa4f639d98900f14e86fafbb5f3807fcf3464c29a3b
|
Provenance
The following attestation bundles were made for keyten-0.1.34-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
py-release.yml on k10works/keyten
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keyten-0.1.34-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
9426527e52923f732bd678f8c97c309043d984fea308dd995cd004a09c9d7190 - Sigstore transparency entry: 2311823147
- Sigstore integration time:
-
Permalink:
k10works/keyten@77dba32732b55680977b6b54bb74e2313b087d35 -
Branch / Tag:
refs/tags/v0.1.34 - Owner: https://github.com/k10works
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-release.yml@77dba32732b55680977b6b54bb74e2313b087d35 -
Trigger Event:
push
-
Statement type: