sparkless backend adapter for PlanFrame (SparkFrame UI + sparkless engine).
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
planframe-sparkless
Sparkless adapter package for PlanFrame. Import as planframe_sparkless.
This package:
- uses the PySpark-like UI from
planframe.spark(SparkFrame) - executes plans using the
sparklessengine (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()returnslist[pydantic.BaseModel]collect_backend()returns the sparkless backend dataframe objectto_dicts()/to_dict()export rows/columns- Async:
acollect()/ato_dicts()/ato_dict()(aliases:collect_async,to_dicts_async,to_dict_async)
- Core v1.2+:
execute_plan_async,planframe.materialize, Expr==/&/ … as IR—see Migrating since v1.1.0.
Notes / limitations
- This adapter aims to support a practical subset of Spark-like operations using
sparkless. - Row streaming:
stream_dicts()currently materializes viato_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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file planframe_sparkless-0.2.0.tar.gz.
File metadata
- Download URL: planframe_sparkless-0.2.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd0b5a7bd43f9904307219c56d81fc73e397c30cb9400c8361dca618fc10fcad
|
|
| MD5 |
372691719b14e1e8483389f5259d72ef
|
|
| BLAKE2b-256 |
d033236d7336649ba922b6f0d7ee0a39f6dc31ce12833273becc277409f99b13
|
File details
Details for the file planframe_sparkless-0.2.0-py3-none-any.whl.
File metadata
- Download URL: planframe_sparkless-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0bf176a93027c7138b488b76fc4cb473768556a063b59a8348c58695b767c8
|
|
| MD5 |
92885f8ba6d96f7f198edac9c7cf2f28
|
|
| BLAKE2b-256 |
71228253c78da096484b57e9c32b77c95bf650c8bdd03ea5127882cb4e0454dd
|