Skip to main content

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

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 equivalents: acollect() / ato_dicts() / ato_dict()

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/

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

planframe_sparkless-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

planframe_sparkless-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file planframe_sparkless-0.1.0.tar.gz.

File metadata

  • Download URL: planframe_sparkless-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for planframe_sparkless-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7b74730a383f3ea4070dd9c26a50cc06e4d3b417396f9995902ad9ee5b4e17ca
MD5 1203cf205beae351db9b115b5f436b4c
BLAKE2b-256 7a5a15939c1ab37c1f5fdbea9e545cc89a9deaffc3ec2e924012ab23743c484d

See more details on using hashes here.

File details

Details for the file planframe_sparkless-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for planframe_sparkless-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f6ab57b4695f9290252cd4fe2d689a9da4b873097949d99d188ee5a39123fc
MD5 d9fce12ff9fced13bb3423c019d7b845
BLAKE2b-256 602fe887cc20b4d7822bd5665f579e788cef55c0bc5d225725e3a3eb5e6e518c

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