Pivot: High-Performance Python Pipeline Tool
Change your code. Pivot knows what to run.
Pivot is a Python pipeline tool with automatic code change detection. Stages are plain
Python functions; you wire them together by calling them inside a Pipeline block, and
Pivot works out what needs to re-run.
- Automatic code change detection using Python introspection
- No paths in pipeline code: Pivot chooses where every output is stored
- Per-stage lock files for fast parallel writes
- Warm worker pools with preloaded imports
- Content-addressable caching with S3 remote storage
Python: 3.13+ | Platform: Unix (Linux/macOS)
Quick Start
pip install pivot
mkdir my_project && cd my_project
git init && pivot init
Put a raw input under data/raw/:
mkdir -p data/raw
printf 'name,value\nalice,100\nbob,200\ncarol,\n' > data/raw/records.csv
Define stages and the pipeline in pipeline.py:
# pipeline.py
import pandas as pd
from pivot import Pipeline, StageParams, stage
class CleanParams(StageParams):
min_value: int = 0
@stage
def clean(records: pd.DataFrame, params: CleanParams) -> pd.DataFrame:
kept = records.dropna()
return kept[kept["value"] >= params.min_value]
@stage
def summarize(rows: pd.DataFrame) -> dict:
return {"count": len(rows), "total": int(rows["value"].sum())}
with Pipeline("demo") as pipeline:
records = pipeline.input("records.csv")
cleaned = clean(records, params=CleanParams(min_value=50))
summarize(cleaned)
Then run it; Pivot resolves the DAG from the handles passed between stages:
pivot repro # runs clean, then summarize
pivot repro # nothing changed: both stages are cached
pivot repro --watch # re-run automatically on file changes
Pivot writes outputs to data/demo/clean.jsonl and data/demo/summarize.yaml.
Learn More
- Documentation
- Source code
- Interactive TUI:
pip install pivot[tui], thenpivot repro --tui
Metadata
Release files for pivot 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pivot-0.3.2.tar.gz | 311.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pivot-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 675.7 kB
Release files / pivot-0.3.2.tar.gz
| Download URL | pivot-0.3.2.tar.gz |
|---|---|
| Size | 311.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1af439ce2ab7960ecd0acddd2c1639cb05811c3b4e8f6b559c67777ccaf564b8
|
|
BLAKE2b-256 checksum How to use checksums |
9248c27376347f1e3fccfe99f0e8f6e76467d1728f736c7de8505ca9a77f437a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pivot-0.3.2-py3-none-any.whl
| Download URL | pivot-0.3.2-py3-none-any.whl |
|---|---|
| Size | 364.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a9fa5d55c67a8bc8ff0459b1bae99715871642483caaf4b805a8e71690dc717
|
|
BLAKE2b-256 checksum How to use checksums |
35d18bfaa76deedd7e53b8958de9f485062948b4e3fb917905faf06ad430f78e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|