A PySpark wrapper that implicitly exposes all PySpark functionality
Project description
Raiju
PySpark, unleashed. A thin wrapper around PySpark that exposes the full SparkSession API through a single, delegation-based interface, so you get all of Spark’s power with a minimal, extension-ready layer.
- Full PySpark surface: Every
SparkSessionAPI is available through Raiju via delegation. Nothing is reimplemented or locked in; new and future PySpark APIs work automatically. - Drop-in entry point: Use
Raijuinstead ofSparkSession. Same builder, same methods, same DataFrames. - Works everywhere: Create a new session with the builder or wrap an existing one (e.g.
sparkin Databricks). - Extension-ready: A minimal foundation you can build on without forking PySpark.
- Single dependency: PySpark 4.0+; no extra runtime deps.
Raiju (雷獣, raijū) is a creature from Japanese folklore: a lightning beast and companion of the thunder god Raijin. The name means “thunder animal”: 雷 (rai, thunder) + 獣 (jū, beast). This project borrows it because it wraps PySpark, your engine for lightning-fast, distributed data, in a thin, flexible layer. All of Spark’s power is still there; Raiju is the interface that carries it.
Raiju aims to give you one clear entry point for PySpark while staying invisible: same APIs, same types, zero lock-in. You can adopt it gradually (e.g. wrap an existing SparkSession in Databricks) or use it as the base for your own extensions.
Table of Contents
- Getting Started
- Usage
- How It Works
- Development
- Changelog
- Support
- Show Your Support
- Code of Conduct
- Contributing
- License
- Security
Getting Started
Installation
Raiju is available as raiju on PyPI (or install from source).
Invoke or install with uv (recommended), pip, or pipx:
# With uv.
uv add raiju # Add to your project.
uv tool install raiju@latest # Or install globally.
# With pip.
pip install raiju
# With pipx.
pipx install raiju
From a local clone:
pip install -e .
For development (linting, formatting, tests):
pip install -e ".[dev]"
Requirements: Python 3.9+, PySpark 4.0+.
Usage
Create a session with the builder:
from raiju import Raiju
raiju = Raiju.builder.appName("my_app").master("local[*]").getOrCreate()
Or wrap an existing session (e.g. in Databricks):
from raiju import Raiju
raiju = Raiju(spark)
Use it like PySpark: SQL, DataFrame API, read, catalog, config. Everything is delegated:
# SQL
df = raiju.sql("SELECT 1 AS one")
# DataFrame API
df = raiju.range(10).filter("id > 5")
# Read data
df = raiju.read.csv("path/to/file.csv", header=True)
# Catalog, UDFs, config
raiju.catalog.listTables()
raiju.conf.set("key", "value")
Any attribute or method on SparkSession is available on your Raiju instance; returned objects (DataFrames, etc.) are standard PySpark types.
How It Works
- No hardcoded API:
Raijuand its builder use__getattr__to forward to the realSparkSession(andSparkSession.builder). New PySpark methods and options work without changes to Raiju. - Single entry point: You get a
Raijuinstance;.read,.sql,.range, and everything else behave as in PySpark. - Thin wrapper: This layer is the base; you can add behavior on top without reimplementing Spark.
Development
pip install -e ".[dev]"
ruff check raiju/ tests/
ruff format raiju/ tests/
pytest tests/ -v
Changelog
See CHANGELOG.md for release history.
Support
Having trouble? Open an issue on GitHub.
Code of Conduct
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
Contributing
Contributions are welcome. See CONTRIBUTING.md for how to get started.
Show Your Support
If you're using Raiju, consider adding the Raiju badge to your project's README.md:
[](https://github.com/seanpavlak/raiju)
License
This repository is licensed under the MIT License.
Security
To report a security concern or vulnerability, see SECURITY.md.
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 raiju-0.1.1.tar.gz.
File metadata
- Download URL: raiju-0.1.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a55a5c81e3fc684d289bc031067ff2c76e1c633100f41d20c4306f7c20dab7
|
|
| MD5 |
0ed7eb082377a2ac1cb1aff7c30644ff
|
|
| BLAKE2b-256 |
521ee807de8b61142c6c62f5615a9f88dd7944b97a562c64bfbfdf06b27521cb
|
Provenance
The following attestation bundles were made for raiju-0.1.1.tar.gz:
Publisher:
pypi-publish.yml on seanpavlak/raiju
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raiju-0.1.1.tar.gz -
Subject digest:
67a55a5c81e3fc684d289bc031067ff2c76e1c633100f41d20c4306f7c20dab7 - Sigstore transparency entry: 1008282417
- Sigstore integration time:
-
Permalink:
seanpavlak/raiju@8dd174df4ee7f2e1ca0928ce1c84bc0fd523cece -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/seanpavlak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8dd174df4ee7f2e1ca0928ce1c84bc0fd523cece -
Trigger Event:
push
-
Statement type:
File details
Details for the file raiju-0.1.1-py3-none-any.whl.
File metadata
- Download URL: raiju-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4ce122cae15e16d5857d954a88c54cdc02031fcb68b7986cdae646ba2c7fdc
|
|
| MD5 |
b7897b600d6564e46282132829e992c8
|
|
| BLAKE2b-256 |
c3d2ca5054bf40de8628be354696c428cef8f767e4963c7993962d49a62d8e08
|
Provenance
The following attestation bundles were made for raiju-0.1.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on seanpavlak/raiju
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raiju-0.1.1-py3-none-any.whl -
Subject digest:
3e4ce122cae15e16d5857d954a88c54cdc02031fcb68b7986cdae646ba2c7fdc - Sigstore transparency entry: 1008282418
- Sigstore integration time:
-
Permalink:
seanpavlak/raiju@8dd174df4ee7f2e1ca0928ce1c84bc0fd523cece -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/seanpavlak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8dd174df4ee7f2e1ca0928ce1c84bc0fd523cece -
Trigger Event:
push
-
Statement type: