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.8.0.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.8.0-cp38-abi3-win_arm64.whl (33.7 MB view details)

Uploaded CPython 3.8+Windows ARM64

sparkless-4.8.0-cp38-abi3-win_amd64.whl (36.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

sparkless-4.8.0-cp38-abi3-musllinux_1_2_x86_64.whl (34.8 MB view details)

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

sparkless-4.8.0-cp38-abi3-musllinux_1_2_aarch64.whl (32.6 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

sparkless-4.8.0-cp38-abi3-manylinux_2_28_aarch64.whl (32.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

sparkless-4.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.8 MB view details)

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

sparkless-4.8.0-cp38-abi3-macosx_11_0_arm64.whl (31.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

sparkless-4.8.0-cp38-abi3-macosx_10_12_x86_64.whl (33.2 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for sparkless-4.8.0.tar.gz
Algorithm Hash digest
SHA256 5a183c68a6c2fdeec1694b8d49709257cc472efaff93246875182795181adb08
MD5 54862e118c608092cbfb40585af3f745
BLAKE2b-256 2d1da4c817097d499526654a370957fec3fa265a1abdd96ec035a751f613b12c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sparkless-4.8.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 33.7 MB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 1727147f155f0f39869123ec0fb8ec12bb3dd1adcfb904688af292e547243003
MD5 6640818398c52ead2025a9bddfb7f2e1
BLAKE2b-256 6399b9336f13e59a54946f89a086b8a8e4d8a17b7a8bf3ac1310f2b4ddb4fe25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sparkless-4.8.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 36.7 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d9f040e724144cb2fbe7794b5e3b3ebe2193f9188530ff755a50fc9fb493aba2
MD5 87b2f09ec17d90c6ee5733866c2adc44
BLAKE2b-256 f67c190d6fd2bb141c85e21f5817391cd87f4778016a63bf139a083cf2a4eb36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ceb804109f5cbd24f19b37401d8459c847a56bf1e3a5828c5ad151986ff6b838
MD5 8ae46a500dd28f95df16506ee1601a61
BLAKE2b-256 856b30de451a61bfcfa474b7850b44c99ef58d1574015cfb3f1ade87d7660bbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 684d8cc2afad10b3ce861052f5551dcac643964159a5e7e18bb5cb4e6fa4d563
MD5 f9b8063edeefd4c39692b89829d828b3
BLAKE2b-256 752ecfca8589fe6b6db6107180b4c83b61cd481372378c8ce0153e0b8f664c27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aeb20946935b8f4f13bbbd41b731b567728317036d0bc322e7db45d6e39b9851
MD5 529fa37ae74385547e019894253df4a2
BLAKE2b-256 097d387443d112c3f4bce583ae9c989d577fd71946fac4baf1aa0c93bb94f1a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8c90ccd488c0f0ec720c2d57cff0e0922949c8c03ade56a33f246e7c7690cf3
MD5 b56c623737c165bb72d6ded3cc6ba9d8
BLAKE2b-256 ffcd3a351b26ca739e9dc2b10384546ece53fa0b4363073e923324f4db5e21e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91292a622c06c248e6f5f0da9e3c88acb89c8b8eb6bcd7ee5f02c41c85d90771
MD5 fa9ad242951ddc9dd926c27910dae329
BLAKE2b-256 58e3f1b130f2486424a5619e366ac22fbf703c6ae07e0ef7692f895f34d3134e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sparkless-4.8.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d29df5eb8759f2dae4ed1b832d96f4fad89ef9b7cbf4e3bfce64453f970c1f43
MD5 eee77aa0bd4bf0ea312ba45cd533eb04
BLAKE2b-256 9b65ea687a11df225410494d21c7e443b8bcf5e48e947af330026949b367570f

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