Skip to main content

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, macOS arm64 (Apple Silicon), 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.
  • Aggregationssum/min/max/mean/count/first/last/std/median/n_unique and pairwise corr, per group or whole-frame.
  • Windowscum_sum, shift, diff, rolling_mean, forward_fill, and over(...) 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.
  • Sourcesscan_csv (strict typed inference), scan_parquet (files or directories, statistics-pruned), and scan_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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

keyten-0.1.47-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

keyten-0.1.47-cp311-abi3-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file keyten-0.1.47-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for keyten-0.1.47-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6b80148dc4edb4ad1ed25c295c655e86a617cb36d48b8e8069e60b094e45448
MD5 73e56c3e15ec5a94bd8546e6cd7b0d67
BLAKE2b-256 c3725e47737150c4cf6b04d88216c49755c80e2ef17ef9d0d3bd49dd6b20bd3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyten-0.1.47-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: py-release.yml on k10works/keyten

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file keyten-0.1.47-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for keyten-0.1.47-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f20312ac0b412ed1a3c085ded8587c35590d3a788264179394148b1f732c1934
MD5 822154644e5dcb1ccf1d819138fc525a
BLAKE2b-256 9aaea34eb17c47f5aa3082339c7ae111e1900fb23b842abed04de28479c56d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyten-0.1.47-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: py-release.yml on k10works/keyten

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page