Skip to main content

ShardLoom Python

Use SQL or lazy DataFrames in Python with the ShardLoom engine. Read, transform, query, and write data through familiar interfaces and supported formats. Start with sl.context(...) and explicit memory and parallelism settings.

Install

Published 1.1.0. Install and platform requirements.

python -m pip install shardloom==1.1.0
  • macOS 26 or newer, Apple silicon; CPython 3.10 or newer; native or subprocess.

  • Linux x86_64, glibc 2.39 or newer; CPython 3.10 or newer; native or subprocess.

  • Windows x86_64; CPython 3.13; subprocess.

The example selects native execution. Use transport="subprocess" for the Windows CLI-backed package.

First query

from pathlib import Path
from tempfile import TemporaryDirectory
import shardloom as sl

workspace = TemporaryDirectory(prefix="shardloom-orders-")
orders = Path(workspace.name) / "orders.csv"
orders.write_text("order_id,status\n1,paid\n2,pending\n3,paid\n", encoding="utf-8")

# Illustrative caller choices: 256 MiB and two execution lanes.
ctx = sl.context(transport="native", memory_bytes=256 << 20, max_parallelism=2)

paid = ctx.read_csv(orders).filter(sl.col("status") == "paid").sort("order_id")
result = paid.collect(check=True)
print(result.to_rows())

ctx.close()
workspace.cleanup()

Expected values:

({'order_id': 1, 'status': 'paid'}, {'order_id': 3, 'status': 'paid'})

Reading, filtering, and sorting describe the work; collect() executes it. Example resources are caller choices, not defaults. See the first workflow for SQL, writing results, and reopening a data file.

More tasks

New in 1.1.0

Pass named scalar parameters and query-local DataFrames to ctx.sql(...) with parameters= and relations=. The same plan can read a local file or a supported Iceberg, Delta Lake or Hudi snapshot. SQL and DataFrame composition · Local table snapshots.

The five-interface example checks the same two ordered rows through each interface, then reopens two outputs and an explicitly prepared Vortex file. It passes with the installed macOS ARM64 GitHub wheel and its bundled CLI. Run the tagged example.

Typed Python embedding

The optional shardloom.native API embeds the same engine with typed plans and engine-owned columnar results. Arrow export is an explicit conversion. See the embedding guide and source-build instructions.

Current 1.3.0 source builds after 1.1.0 carry dense Float16/Float32/Float64 vectors, declared embedding identity, fixed- and variable-shape tensors, sparse coordinates, affine quantization codes, inline binary content and nested values through native data workflows, alongside pure-AST SQL binding, native hash joins and partitioned windows, binary Arrow IPC worker batches, resident LayoutReader reuse, 16K–64K Vortex spill, and optional AI/Foundry/portable-worker surfaces. See rich-column declarations and output fidelity and 1.3.0 source milestone notes. These additions are not in the published 1.1.0 wheels.

Variable-shape tensor declarations passed local, installed-package and hosted integration checks in PR #1662; these declarations are not in the published wheels. See the variable-shape tensor guide.

Explicit types.float16() declarations require exactly representable values. Use lists of fixed-size vectors or embeddings for several vectors per row. The rich-vector example creates, selects, writes and reopens those values, sparse vectors and quantized vectors in a matching source build. Sparse coordinate order and duplicates are preserved under the declared index policy; quantized codes and scale/zero-point parameters retain their original types. Vector arithmetic, quantization and dequantization remain separate capabilities.

Application batch functions

Published 1.1.0 native Python wheels support explicitly trusted, deterministic, row-preserving Python callables through ctx.batch_functions.register(...) and frame.map_batches(function). Rust callbacks use the same native operator. Declare ordered input/output schemas, null behavior, version and resource limits; the callable runs only during an action. See the example and ownership contract. This in-process API requires the Linux or macOS native Python wheel or a matching source build.

Contributor tooling

Metadata

Release files for shardloom 1.3.0

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

Source distribution (sdist)

Source distribution for shardloom 1.3.0
File Size Uploaded Provenance Actions
shardloom-1.3.0.tar.gz 1.4 MB With provenance Details for shardloom-1.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for shardloom 1.3.0
File Interpreter ABI Platform Actions
shardloom-1.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for shardloom-1.3.0-cp313-cp313-win_amd64.whl
shardloom-1.3.0-cp310-abi3-manylinux_2_39_x86_64.whl CPython 3.10 abi3 Linux glibc 2.39+ x86-64 Details for shardloom-1.3.0-cp310-abi3-manylinux_2_39_x86_64.whl
shardloom-1.3.0-cp310-abi3-macosx_26_0_arm64.whl CPython 3.10 abi3 macOS 26.0+ ARM64 Details for shardloom-1.3.0-cp310-abi3-macosx_26_0_arm64.whl

Total release size: 158.2 MB

Release files / shardloom-1.3.0.tar.gz

Download URL shardloom-1.3.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3705809744cd5e0ce7fece227cb2460af36a0d09ef75595aaad066016c4f57db
BLAKE2b-256 checksum
How to use checksums
f815ad3564e2389e9fb2459ee107c8531ddb536cf9a9b3e2bc4d830b1deb0698
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 Nov 25, 2026.

Transparency log

Release files / shardloom-1.3.0-cp313-cp313-win_amd64.whl

Download URL shardloom-1.3.0-cp313-cp313-win_amd64.whl
Size 27.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a8c1a66675d6b8ce7fce019b37be04f99d881943384839d1eea0d633f4f7c359
BLAKE2b-256 checksum
How to use checksums
63c7cebc6d2876416219f14dba1ae5aa97be53067f552bc5b9e3cb05745b1761
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 Nov 25, 2026.

Transparency log

Release files / shardloom-1.3.0-cp310-abi3-manylinux_2_39_x86_64.whl

Download URL shardloom-1.3.0-cp310-abi3-manylinux_2_39_x86_64.whl
Size 68.0 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
6701fb584a96fff2a29341d04c3531302679cccb844d46b38119fe5a144937f1
BLAKE2b-256 checksum
How to use checksums
e94bb551ec4bba639d259a9a52663f96cbbb4e2d3bc93493b292b9b4b2acd0dc
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 Nov 25, 2026.

Transparency log

Release files / shardloom-1.3.0-cp310-abi3-macosx_26_0_arm64.whl

Download URL shardloom-1.3.0-cp310-abi3-macosx_26_0_arm64.whl
Size 60.9 MB
Tags CPython 3.10 abi3 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
f4a1b52b753754251de9255146f10b0211fb86cdfba5d2e81f3dea8d7338520f
BLAKE2b-256 checksum
How to use checksums
6f50ef3cabd7cb0d7757d365080c1600d1afc2d3eced580d8b97378172a2a606
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 Nov 25, 2026.

Transparency log

Security for shardloom 1.3.0

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 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for shardloom-1.3.0.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 Nov 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