Skip to main content

PySpark-like DataFrame API in Python—no JVM. Uses robin-sparkless (Rust/Polars) as the execution engine.

Project description

Robin Sparkless

PySpark-style DataFrames in Python—no JVM. Install the sparkless package for a drop-in local PySpark replacement (fast unit tests + CI, no Java/Spark). Under the hood it’s powered by the robin-sparkless Rust engine using Polars for execution.

CI PyPI crates.io docs.rs Documentation License: MIT


Quick start (Python)

# Swap the import—everything else stays the same.
from sparkless.sql import SparkSession, functions as F

spark = SparkSession.builder.app_name("demo").get_or_create()
df = spark.createDataFrame([{"x": 1}, {"x": 2}])
df.filter(F.col("x") > 1).show()

Install from PyPI:

pip install "sparkless>=4,<5"

More Python docs (SQL/temp views, Delta, JDBC, testing plugin): see python/README.md.


Why Sparkless (Python)?

  • Familiar APISparkSession, DataFrame, Column, and PySpark-like functions so you can reuse patterns without the JVM.
  • Fast local execution — Runs natively (no JVM) and uses Polars for IO, expressions, and aggregations.
  • Test the same suite two ways — Use sparkless.testing to run tests with Sparkless (fast) or real PySpark (parity checks).
  • Optional “Spark-like” features — SQL, temp/global temp views, saveAsTable, Delta, and JDBC (see python/README.md).

Features (Python surface)

Area What’s included
Core SparkSession, DataFrame, Column, functions
IO CSV, Parquet, JSON, Delta
Expressions col, lit, when/otherwise, casts, null handling
Aggregates count, sum, avg, min, max, groupBy().agg()
Window row_number, rank, dense_rank, lag, lead, first_value, last_value via .over()
Arrays, strings, JSON Common PySpark functions (explode, regexp_*, get_json_object, from_json, to_json, …)
SQL + views spark.sql, temp/global temp views, saveAsTable, catalog().listTables()
JDBC Read/write via spark.read.jdbc(...) / df.write.jdbc(...)

Parity: 200+ fixtures validated against PySpark. Known differences: docs/PYSPARK_DIFFERENCES.md. Full parity status: docs/PARITY_STATUS.md. Out-of-scope items: docs/DEFERRED_SCOPE.md.


Installation

Python (sparkless v4)

Install from PyPI:

pip install "sparkless>=4,<5"

Or from this repo:

pip install ./python

See python/README.md for usage and development (including maturin develop).

Rust engine (optional)

Most users should use the Python package above. If you want to embed the engine directly in Rust, depend on robin-sparkless.

Add to your Cargo.toml:

[dependencies]
robin-sparkless = "4"

Optional features:

robin-sparkless = { version = "4", features = ["sql"] }      # spark.sql(), temp views
robin-sparkless = { version = "4", features = ["delta"] }    # Delta Lake read/write
robin-sparkless = { version = "4", features = ["jdbc"] }     # PostgreSQL JDBC
robin-sparkless = { version = "4", features = ["sqlite"] }   # SQLite JDBC
robin-sparkless = { version = "4", features = ["jdbc_mysql"] } # MySQL/MariaDB JDBC

Development

If you’re working on the Python package, start in python/README.md (it covers maturin develop, pytest, and dual-mode testing).

If you’re working on the Rust engine crates, see docs/QUICKSTART.md and the crate READMEs in crates/.

This repository contains:

  • python/: the sparkless Python package (v4)
  • Rust crates: the robin-sparkless engine (Cargo workspace)
Command Description
pip install ./python Install the Python package from this repo
cd python && maturin develop Editable install for Python development
pytest tests/ -v Run Python tests (sparkless backend)
SPARKLESS_TEST_MODE=pyspark pytest tests/ -v Run the same tests against real PySpark
scripts/typecheck_strict.sh Strict mypy for the Python sparkless package
make check Rust engine: format, clippy, audit/deny, Rust tests
make test-parity-phases Run PySpark parity fixtures (Rust engine)

CI runs format, clippy, audit, deny, Rust tests, and parity tests on push/PR (see .github/workflows/ci.yml).


Documentation

Resource Description
Python package Sparkless v4 — install from PyPI (pip install sparkless) or pip install ./python, quick start, Sparkless 3 vs 4.x, API overview
Read the Docs Full docs: quickstart, Rust usage, Python getting started, Sparkless integration (MkDocs)
docs.rs Rust API reference
QUICKSTART Build, usage, optional features, benchmarks
User Guide Everyday usage (Rust)
Persistence Guide Global temp views, disk-backed saveAsTable
UDF Guide Scalar, vectorized, and grouped UDFs
Testing Guide Dual-mode testing with sparkless.testing
PySpark Differences Known divergences
Roadmap Development phases, Sparkless integration
RELEASING Publishing to crates.io and PyPI

See CHANGELOG.md for version history.


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparkless-4.12.1.tar.gz (20.7 MB view details)

Uploaded Source

Built Distributions

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

sparkless-4.12.1-cp38-abi3-win_arm64.whl (35.3 MB view details)

Uploaded CPython 3.8+Windows ARM64

sparkless-4.12.1-cp38-abi3-win_amd64.whl (38.2 MB view details)

Uploaded CPython 3.8+Windows x86-64

sparkless-4.12.1-cp38-abi3-musllinux_1_2_x86_64.whl (36.5 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

sparkless-4.12.1-cp38-abi3-musllinux_1_2_aarch64.whl (34.2 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

sparkless-4.12.1-cp38-abi3-manylinux_2_28_aarch64.whl (34.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

sparkless-4.12.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.5 MB view details)

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

sparkless-4.12.1-cp38-abi3-macosx_11_0_arm64.whl (32.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

sparkless-4.12.1-cp38-abi3-macosx_10_12_x86_64.whl (35.0 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file sparkless-4.12.1.tar.gz.

File metadata

  • Download URL: sparkless-4.12.1.tar.gz
  • Upload date:
  • Size: 20.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for sparkless-4.12.1.tar.gz
Algorithm Hash digest
SHA256 543b57b40577e777ce0213cc9d8d212960aea0759e5b770d9578e4308d39eeea
MD5 4dd130e7cd6a8e6e6fbc974cb3e00dd4
BLAKE2b-256 6519c52a80583db104f8112d3e05177c030c1fbcc16bdd4e5e7aced80e687876

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 cf8915e9607afef5ece5ea74847466eb4cffbd95fb7153653ab0cb2b61798163
MD5 dd97108b6307755bf37a8c91e453eedf
BLAKE2b-256 7e1c771084252d40065172f729d9d46ca4cb7260a76933888242471b85fc8d54

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 717d557c9f3c4ee22256c19387570ffdc7c6c0ca450a79479d5789b75f54cb63
MD5 1834f506fa231528bf5b970eed677f90
BLAKE2b-256 55cc45fa52d88ffd6e0cd0b2f33bacbbbeefaa1c500cc1fb858e2ab84813b8fc

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c87c26df7fe932cc530471f9014fcf94e2026431925c907e8762b291442d1361
MD5 f9427bab132e1290b0f9b4b06fa70d76
BLAKE2b-256 8f02e5f32a62cac2493afede5c5e31a8c01949c059b6cf84b8ca71b8f37cff59

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cb42bd58df767d14680c8b5651d0a1b1109088c5e6cdf99dfd10bb868326896e
MD5 2b8cb7671c5743d8df56961e76018709
BLAKE2b-256 ff898ca70462841dde4ae51c30b6946d0c310843d655a1342edd724dbce15ede

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fbc9335d9c93db8153d725f793b2a11565b5e81db496740b38ff03596e2c7ff4
MD5 bb67eb3482cebf6dc37e3945d239b0aa
BLAKE2b-256 a699ef1b199f6664500746de7247e67651446aa487154ba61ce197fefb5d8941

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f37d401bc687ae7d9d506209082aa2f1527f37a926917060caaf7777454f6883
MD5 07253b23399508c242a74623d8a1a825
BLAKE2b-256 62c42f5b4aa3c2a4349901ec839d7c9bea5cdc66bdd90e5c0bce2707a7743a47

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 629da3ae803356b683920192e0970bcc5ed105772ebebfd4e4b240654f432618
MD5 2bf4591974ff437cc7b714f6799d5f95
BLAKE2b-256 8d0303a70c26c3b99a44ee8edbd9d2520e6e1b9428adafe9eab3cecdb19002e1

See more details on using hashes here.

File details

Details for the file sparkless-4.12.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for sparkless-4.12.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7aac829af58e00fffbaf673295e573de40558cf19eafab8d2c670fa88d3cdd81
MD5 7abb17e666a16615f6fcdf14954ce9ae
BLAKE2b-256 c30cc5da3f163d65be5a0f10147bbcf83aeafc54fe70e76a757c068db115132e

See more details on using hashes here.

Supported by

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