Skip to main content

Sphuling (pysphuling)

Python 3.10+ License: Apache 2.0 Engine: DataFusion & Arrow

Sphuling (Bengali: স্ফুলিঙ্গ / Sanskrit: स्फुलिंग) is an ultra-fast, local-first analytics engine and library. It brings 100% of the single-node developer ergonomics, DataFrame transformations, column expressions, analytical window functions, and Spark SQL query features of Apache Spark / PySpark to local development without JVM dependencies, cluster management overhead, or Py4J socket serialization.

Powered under the hood by Apache DataFusion, Apache Arrow, and DuckDB.


⚡ Why Sphuling?

Metric / Feature PySpark (Local Mode) Sphuling (pysphuling)
Session Cold Startup 5,000 – 15,000 ms 1.33 ms (Instant)
1M Rows Execution ~800 – 2,500 ms 5.53 ms (SIMD Vectorized Rust)
Java / JVM Requirement Mandatory (JRE/JDK) Zero (Pure native wheels)
Data Interchange Py4J TCP Socket marshaling Zero-Copy Arrow C Data Interface
Schema Introspection Often triggers full scans Universal Zero-Load ($O(1)$ footers)
Workstation Resource Control Complex JVM heap tuning Simple cores & memory bounds + auto spill

🚀 Quick Start

from pysphuling.sql import SphulingSession, functions as F, types as T, Window

# 1. Initialize local session with 8 cores and 8 GB RAM
sphuling = (
    SphulingSession.builder
    .appName("SphulingPipeline")
    .master("local[*]")
    .config("sphuling.executor.cores", "8")
    .config("sphuling.executor.memory", "8g")
    .getOrCreate()
)

# 2. Read dataset with instant zero-load schema
df = sphuling.read.parquet("data/*.parquet")
df.printSchema()

# 3. Build lazy transformation DAG
w = Window.partitionBy("department").orderBy(F.col("salary").desc())

transformed = (
    df.filter(F.col("salary") > 50000)
    .withColumn("bonus", F.col("salary") * 0.15)
    .withColumn("rank", F.rank().over(w))
    .groupBy("department")
    .agg(
        F.count("*").alias("employee_count"),
        F.avg("salary").alias("avg_salary"),
        F.max("bonus").alias("max_bonus")
    )
    .orderBy(F.col("avg_salary").desc())
)

# 4. Trigger execution
transformed.show()

🔄 Drop-in PySpark Migration

Existing PySpark pipelines run with zero code modifications:

# Simply swap the import:
import pysphuling as pyspark
from pyspark.sql import SparkSession, functions as F, types as T, Window

# Everything else remains 100% identical:
spark = SparkSession.builder.appName("MyPySparkApp").getOrCreate()
df = spark.read.parquet("data/")
df.filter(F.col("age") > 21).show()

📖 Sequential Documentation Hub

The documentation is organized in a clear numbered reading order:


🛠️ Testing & Verification

Run the test suite across all modules:

pytest tests/

Run performance and latency benchmarks:

python tests/benchmarks/benchmark_speed.py

📄 License

Sphuling is licensed under the Apache License 2.0.

Metadata

Release files for sphuling 1.0.0

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

Source distribution (sdist)

Source distribution for sphuling 1.0.0
File Size Uploaded Provenance Actions
sphuling-1.0.0.tar.gz 34.3 kB Without provenance Details for sphuling-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphuling 1.0.0
File Interpreter ABI Platform Actions
sphuling-1.0.0-py3-none-any.whl Python 3 none any Details for sphuling-1.0.0-py3-none-any.whl

Total release size: 72.0 kB

Release files / sphuling-1.0.0.tar.gz

Download URL sphuling-1.0.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c7849d1671eee1db8ae76f8577dd0f96653ef754cc02ba196871c1db3c4e0bf
BLAKE2b-256 checksum
How to use checksums
dfbc1de79d30faf8fc3d15e0f10bd370cd8d2454f6f67c8435369b4be64764aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.8

Release files / sphuling-1.0.0-py3-none-any.whl

Download URL sphuling-1.0.0-py3-none-any.whl
Size 37.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa4e9107ebbb028f2fd1666bfd09fe2a9d87bb4736bd341992dbef2ff98a161d
BLAKE2b-256 checksum
How to use checksums
ff8bbb1089352d4c66ba103cb2d2bcdfbef068121b10068f6305ca4599cb4fe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.8

Security for sphuling 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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