Skip to main content

PyPlyne Documentation

PyPlyne brings clean functional pipes directly to Python. It gives data transformations a left-to-right shape while staying inside the Python runtime, with Polars-first table workflows and compact sequence workflows for JSON-like records.

Use this page to choose the next doc for your task. If you are new to PyPlyne, start with the Quickstart. It shows how to install PyPlyne in your own project and write your first pipelines.

Where To Go

PyPlyne At A Glance

PyPlyne has two pipeline shapes:

  • df for Polars-backed table transformations.
  • seq for Python iterables, especially JSON-like records/lists.

Both shapes use |> to pass data through readable steps, and both execute inside Python without generating .py files.

Tiny Examples

sales = df [
{"region": "north", "amount": 120},
{"region": "south", "amount": 80},
{"region": "north", "amount": 220},
]

summary = sales
|> where(amount > 100)
|> group_by(region)
|> summarize(total = sum(amount), rows = count())

df tells PyPlyne the pipeline is table-shaped. Bare names inside table verbs, such as amount and region, are compiled into Polars expressions.

orders = seq [
{"item": "coffee", "qty": 3},
{"item": "pens", "qty": 2},
]

restock = orders
|> filter(qty > 1)
|> keep_fields(item)
|> set_fields(buy = item == "pens")

seq keeps record-oriented data in ordinary Python containers while giving you a compact pipeline style for filtering, mapping, and reshaping.

Common Tasks

Reading Path

  1. Quickstart to install PyPlyne and run one file.
  2. Core Concepts to understand seq, df, execution, and Python interop.
  3. Language Guide for table pipelines, files, and practical syntax.
  4. Sequence Patterns to use seq with records, objects, and functions.
  5. Interactive Sessions if you want a persistent REPL or agent-facing session.
  6. Language Reference when you need exact syntax or verb behavior.

Project Status

PyPlyne is early-stage, and these docs describe the implementation in this repository. The language surface is intentionally small: Python imports, shape-aware verbs, Polars-backed table transforms, record helpers, file helpers, and persistent sessions are the core pieces to learn first.