Skip to main content

Krishiv

Spark alternative in Rust: PySpark and Spark SQL without the JVM.

Krishiv runs Spark SQL and a PySpark-style DataFrame API inside your Python process. No cluster, no JVM, no server to start. Execution is vectorized on Apache Arrow, and results come back as Arrow tables you can hand to pandas, Polars or DuckDB without copying.

Install

pip install krishiv

Needs Python 3.11 or newer. pyarrow is installed with it. For toPandas() add the extra: pip install "krishiv[pandas]".

30-second example

import krishiv
from krishiv.sql import functions as F

spark = krishiv.session()  # a PySpark-style SparkSession, in process

spark.sql("SELECT 1 AS answer").show()

df = spark.sql("SELECT * FROM VALUES ('east', 10.0), ('west', 20.0), ('east', 5.5) AS t(region, amount)")
df.groupBy("region").agg(F.sum("amount").alias("revenue")).orderBy("region").show()

table = df.toArrow()  # a pyarrow.Table; also pa.table(df), polars.DataFrame(df), duckdb.from_arrow(df)

What works in 0.2

  • Batch Spark SQL and DataFrames, in process, over Arrow. krishiv.sql mirrors pyspark.sql (import paths and signatures); errors in krishiv.errors carry Spark's error classes.
  • Reading and writing Parquet files; EXPLAIN and EXPLAIN ANALYZE with per-operator rows, time and memory.
  • Spark's function library, with Spark's results (hashing, casts, null handling and error behaviour follow Spark).
  • krishiv.testing: assertDataFrameEqual and a pytest fixture, to run your PySpark tests without a JVM.

Streaming, incremental views, Spark Connect and distributed execution are still being built. This is an alpha: there is no stable API yet.

Speed

Benchmark results against Spark 4.2.0 on TPC-H-derived queries (not official TPC results) are published with their method, queries and raw numbers at https://krishiv.ai/benchmarks.

Supported CPUs

The default wheels need an x86-64-v3 CPU (Intel Haswell, 2013, or AMD Zen and newer) or, on arm64, Armv8.2 (AWS Graviton2, Apple silicon). On an older x86-64 CPU install krishiv-compat instead: the same package and the same import krishiv, built for the plain x86-64 baseline (Linux only). Install one of the two, not both.

Krishiv is licensed under Apache-2.0. Apache Spark is a trademark of the Apache Software Foundation; Krishiv is not affiliated with it.

Metadata

Release files for krishiv-compat 0.3.0

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

Built distribution (wheel)

Table of built distributions (wheels) for krishiv-compat 0.3.0
File Interpreter ABI Platform Actions
krishiv_compat-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for krishiv_compat-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl

Release files / krishiv_compat-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL krishiv_compat-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 38.3 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
99c6234e66e7f923ad9433f85d2e944cdab40e333bee4b64722bb0bc361deaca
BLAKE2b-256 checksum
How to use checksums
1f18eeb9dff9b0dabe703e8de057320772ea1d4fb42384ca432ef71aa1747aa8
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 krishiv-compat 0.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

1 file in this release has been uploaded with provenance metadata.

Attestation for krishiv_compat-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file Full provenance

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