Skip to main content

PySpark-like DataFrame API in Rust (Polars backend), with Python bindings via PyO3

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

robin-sparkless (Python)

PyPI version Python 3.8+ License: MIT Documentation Source

PySpark-style DataFrames in Python—no JVM. Uses Polars under the hood for fast execution.

Install

pip install robin-sparkless

Requirements: Python 3.8+

Quick start

import robin_sparkless as rs

spark = rs.SparkSession.builder().app_name("demo").get_or_create()
df = spark.create_dataframe(
    [(1, 25, "Alice"), (2, 30, "Bob"), (3, 35, "Charlie")],
    ["id", "age", "name"],
)
filtered = df.filter(rs.col("age").gt(rs.lit(26)))
print(filtered.collect())
# [{"id": 2, "age": 30, "name": "Bob"}, {"id": 3, "age": 35, "name": "Charlie"}]

Read from files:

df = spark.read_csv("data.csv")
df = spark.read_parquet("data.parquet")
df = spark.read_json("data.json")

Filter, select, group, join, and use window functions with a PySpark-like API. See the full documentation for details.

Optional features (install from source)

Building from source requires Rust and maturin. Clone the repo, then:

pip install maturin
maturin develop --features pyo3           # default: DataFrame API
maturin develop --features "pyo3,sql"      # spark.sql() and temp views
maturin develop --features "pyo3,delta"    # read_delta / write_delta
maturin develop --features "pyo3,sql,delta" # all optional features

Type checking

The package ships with PEP 561 type stubs (robin_sparkless.pyi). Use mypy, pyright, or another checker:

pip install robin-sparkless mypy
mypy your_script.py

For Python 3.8 compatibility, use mypy <1.10 (newer mypy drops support for python_version = "3.8" in config). The project’s pyproject.toml includes [tool.mypy] and [tool.ruff] with target-version / python_version set for 3.8.

Development

From a clone of the repo:

python -m venv .venv
source .venv/bin/activate   # or .venv\Scripts\activate on Windows
pip install -r requirements-ci.txt
maturin develop --features pyo3 --release
pytest tests/python/ -v

Lint and format:

ruff format .
ruff check .
mypy .

CI uses requirements-ci.txt (maturin, pytest, mypy<1.10 for Python 3.8).

Links

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 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.

robin_sparkless-0.1.1-cp38-abi3-win_arm64.whl (14.2 MB view details)

Uploaded CPython 3.8+Windows ARM64

robin_sparkless-0.1.1-cp38-abi3-win_amd64.whl (15.8 MB view details)

Uploaded CPython 3.8+Windows x86-64

robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl (14.8 MB view details)

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

robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl (13.6 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

robin_sparkless-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl (13.8 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

robin_sparkless-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.8 MB view details)

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

robin_sparkless-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (15.7 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

robin_sparkless-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 f25ddeb4e61c0ee4266a0ad1c7e1ecdcdaff54d1f1209edb0206a91be1e4ae46
MD5 e1fb51c3146e49cc17cf6cd731a2e10c
BLAKE2b-256 91c6e37afb907961a8bb471fb1b3448f0e9b2bc2fcde2f710654ebd0c6c30b2f

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 422a7629534f8c2ceae7ae8dd3370c97ff7cf6dc044aab1414581dc393c54f8a
MD5 9bbcb849a60d8d7778a4b5d4158b3bea
BLAKE2b-256 10bdfddc1f3548dd122c9ea0825056ae309ea18b3617205444625c7e68581d0d

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bc348f81930c836726c7c9cf418787a16159c9591dfae54aaeff6767c74827e2
MD5 910c83d2a7158bb78681468e7d237ce9
BLAKE2b-256 9b123fac16cbba0c72e46fbe2a71c2a17fd0c99af5d46c6a0ba987516cd6e394

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f733806a8a2c2f300b26d6260ea3cc1327d7a798c882b3b158f9b745069928ea
MD5 5460001a4fef9b016bffe1f78484678b
BLAKE2b-256 fa8fa715d71f918e1bdabee869852e15447e6615eb924ec66b8a29d2bcb38f7f

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ea6c3705fcefe2f09f8e18f5d9bf14d1bce6a79f9e6bf83f01b436337e7e88ae
MD5 0db56f4b460b3c17b2cf5b8fdf618ba2
BLAKE2b-256 b79aa510637d8cd51d5d02313074372b8a7d7245650918c2adf3ad8d0c2d087d

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2bf2c7480e714833164636ad02f26d1f8fdea75b68200811e4f92ae2f1338424
MD5 64c9aa16ab564914bfccbe90990a7b1d
BLAKE2b-256 374b78825812664dfc440b27fe390ec97ef4cb1210bd369240b5e04681e066d6

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc5aee59d21a953063bd87c199101de5ac774dc8b2701440eb595aee809b78b1
MD5 7daa7f08be9972970e0018db4aa9bff2
BLAKE2b-256 018d4de150e3bfc6ae1b0fd842fb91a3308ba02824837ad61147d987e13fcd2a

See more details on using hashes here.

File details

Details for the file robin_sparkless-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for robin_sparkless-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 836ef7db4f8f1f7df65edcddeca8be981a0b6e6528694ddcdbd82d73bc11a210
MD5 0fe1247d4e747566900f667ba37f688c
BLAKE2b-256 a1d48bd59209c452bb8696f3fa0ce7fca9df498d500ac565e6ad31abbda923ea

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