Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

planframe-sparkless

Docs License: MIT

Sparkless adapter package for PlanFrame. Import as planframe_sparkless.

This package:

  • uses the PySpark-like UI from planframe.spark (SparkFrame)
  • executes plans using the sparkless engine (no JVM)

Documentation (ReadTheDocs):

  • Sparkless track (end users): https://planframe.readthedocs.io/en/latest/planframe_sparkless/

Install

pip install planframe-sparkless

Quickstart

from planframe.expr import add, col, lit
from planframe_sparkless import SparklessFrame


class User(SparklessFrame):
    id: int
    x: int


pf = User([{"id": 1, "x": 2}, {"id": 2, "x": 3}])

out = (
    pf.select("id", "x")
    .withColumn("x2", add(col("x"), lit(1)))
    .where(pf["x"] > lit(2))
    .select("id", "x2")
)

print(out.to_dicts())

Execution model (PlanFrame)

  • PlanFrame is always lazy: chaining does not execute backend work.
  • Materialization boundaries:
    • collect() returns list[pydantic.BaseModel]
    • collect_backend() returns the sparkless backend dataframe object
    • to_dicts() / to_dict() export rows/columns
    • Async: acollect() / ato_dicts() / ato_dict() (aliases: collect_async, to_dicts_async, to_dict_async)
  • Core v1.2.0+ (current minor v1.3.x): execute_plan_async, planframe.materialize, Expr == / & / … as IR, plus v1.3.0 adapter hooks—see Migrating since v1.1.0. This package requires planframe>=1.3.0 (see pyproject.toml on PyPI).

Notes / limitations

  • This adapter aims to support a practical subset of Spark-like operations using sparkless.
  • Row streaming: stream_dicts() currently materializes via to_dicts() (sparkless does not expose an efficient local iterator API yet).
  • For backend-agnostic semantics and supported transforms, see the core docs: https://planframe.readthedocs.io/en/latest/planframe/

Metadata

Release files for planframe-sparkless 0.2.1

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

Source distribution (sdist)

Source distribution for planframe-sparkless 0.2.1
File Size Uploaded
planframe_sparkless-0.2.1.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for planframe-sparkless 0.2.1
File Interpreter ABI Platform
planframe_sparkless-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / planframe_sparkless-0.2.1.tar.gz

Download URL planframe_sparkless-0.2.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb3382077af228eeb74f695e68e23dc84e8c855387b5023f267e2a5b52b926ef
BLAKE2b-256 checksum
How to use checksums
0a4c1d08a66f21b42c04cf208170a2baa32d83ac3af7cd9584f1ff69c5ac3114
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / planframe_sparkless-0.2.1-py3-none-any.whl

Download URL planframe_sparkless-0.2.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
060bfde849a84c6cb8f0544bddc37276147201610dff3ae6166f412b2eeec106
BLAKE2b-256 checksum
How to use checksums
5803d3067adc45b45c2b2916a905b4bf88ea9d3dab5dfc72382e2447bea01fcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

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