Larkspur tabular transforms, kept small
◆ v0.9.4

Larkspur

A small, dependency-light toolkit for shaping and streaming columnar data in Python. One file, no surprises.

Larkspur gives you a handful of composable pieces — Frame, Stream, and Transform — and gets out of your way. It reads and writes CSV and newline-delimited JSON, keeps memory flat on large inputs, and never reaches for a heavy runtime.

Streaming by default

Process millions of rows with constant memory. Larkspur pulls rows on demand instead of loading everything at once.

Composable transforms

Chain small, testable steps. Each transform takes a row and returns a row (or nothing) — that is the whole contract.

Readable output

Deterministic column ordering and stable formatting make diffs and snapshots painless.

Tiny footprint

A single module, standard library only. Vendor it into your project if you prefer no dependencies at all.

A quick taste

from larkspur import Frame, select, rename, where

rows = (
    Frame.read_csv("sales.csv")
    | where(lambda r: r["region"] == "west")
    | select("date", "sku", "amount")
    | rename(amount="total")
)
rows.write_ndjson("west.ndjson")

Ready to try it? Head to Installation, then the five-minute Quickstart.