Metadata-Version: 2.4
Name: raikou
Version: 0.1.0
Summary: Spark DataFrame helpers on raikou-core: sessions, frames, and expression helpers.
Author-email: Odos Matthews <odosmatthews@gmail.com>
Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/eddiethedean/raikou
Project-URL: Repository, https://github.com/eddiethedean/raikou
Project-URL: Issues, https://github.com/eddiethedean/raikou/issues
Project-URL: Changelog, https://github.com/eddiethedean/raikou/blob/main/CHANGELOG.md
Keywords: dataframe,spark,pyspark,raikou-core,data-engineering
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: raikou-core<0.2,>=0.1.0
Requires-Dist: pydantic<3,>=2
Requires-Dist: pyspark<4,>=3.4
Requires-Dist: typing-extensions>=4.5
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"
Requires-Dist: ty>=0.0.28; extra == "dev"
Dynamic: license-file

# raikou

High-level Spark helpers built on **`raikou-core`**.

PyPI: https://pypi.org/project/raikou/

Repository: https://github.com/eddiethedean/raikou

`raikou` provides:

- SparkSession helpers (`connect`)
- a small DataFrame-style facade (`RaikouDataFrame`) backed by `raikou-core`'s engine
- convenience expression helpers (`col`, `lit`)

## Requirements

- **Python**: 3.10+
- **Spark**: `pyspark>=3.4,<4` (a Spark runtime must be available in your environment)

## Install

```bash
pip install raikou
```

## Quick start

```python
from raikou import RaikouDataFrame, Schema, col, connect


class Row(Schema):
    x: int
    y: str


spark = connect(master="local[2]")
sdf = spark.createDataFrame([{"x": 1, "y": "a"}, {"x": 2, "y": "b"}])

df = RaikouDataFrame[Row].from_spark_dataframe(sdf)
out = df.filter(col("x") > 1).select("y").to_dict()
```

## What’s in the box?

- **`connect(...)`**: convenience helper for creating/configuring a `SparkSession`
- **`Schema`**: typed row schema for a `RaikouDataFrame`
- **`RaikouDataFrame[T]`**: a small, typed facade backed by the `raikou-core` engine
- **`col(...)` / `lit(...)`**: expression helpers used with `filter`, `select`, etc.

## Development (monorepo)

From the repository root:

```bash
make install-editable
make test
make lint
make format
```

## Relationship to `raikou-core`

`raikou` depends on [`raikou-core`](https://pypi.org/project/raikou-core/) for the
Spark-backed execution engine and planning/expression layer. If you only need the
engine primitives (e.g. for building another library), you can depend on
`raikou-core` directly.

## License

MIT (see repository `LICENSE`).
