Python API Tutorials
Worked, hands-on pipelines built with the Python API. Start with the code-to-flow walkthrough, then use the short patterns below as building blocks.
Tutorial
Building Flows with Code
Build a pipeline programmatically and open it as a visual graph in the Designer. Covers from_dict, expressions, conditional logic, grouping, and open_graph_in_editor.
Patterns
A complete pipeline
This snippet is a repository file executed by CI — read, derive, filter, aggregate:
import flowfile as ff
SALES = "https://raw.githubusercontent.com/edwardvaneechoud/flowfile/main/data/templates/supermarket_sales.csv"
revenue_by_line = (
ff.read_csv(SALES)
.with_columns((ff.col("unit_price") * ff.col("quantity")).alias("revenue"))
.filter(ff.col("quantity") > 5)
.group_by("product_line")
.agg(ff.col("revenue").sum().alias("total_revenue"))
.collect()
)
For the same shape with deduplication and multiple aggregations, see the tested sales pipeline; for grouped analytics, window functions, and selectors, the aggregations reference opens with a CI-tested example.
Related
- API Reference — method-by-method documentation
- Core Concepts — the FlowFrame and FlowGraph model
- Quick Start — install and build a first pipeline