Python API Tutorials
Build one city sales report from supermarket invoices, then turn it into a reusable, parameterized flow. Each chapter extends the previous one, links to a complete runnable script, and shows what that script prints.
-
Build the report
- 1. First steps: read, transform, collect, and print the graph
- 2. Clean and shape: editable formulas and expression semantics
- 3. Combine: union customer segments and join city targets
- 4. Aggregate: summarize revenue without multiplying targets
-
Run the report repeatedly
- 5. Flow parameters: change the basket threshold between runs
- 6. Branching with Gate: route the whole report when any city falls short
- 7. Write results: files, catalog tables, and cloud storage
- 8. Reusable flows: extract a child flow and compare thresholds
- 9. Custom logic: a percentage score with SQL, a custom node, or Python
- 10. Ship it: save, run headlessly, schedule, and open in the Designer
Use the Quick Start for installation. Download a chapter script and run it with Python, for example python tutorial_01.py. The scripts fetch the public supermarket_sales.csv; they do not need a repository checkout. Chapters 7 and 10 write a city_report folder into the directory you run them from and a tutorial_sales catalog table; chapters 8–10 register flows in your catalog, and chapter 9 installs a custom node. The output shown on each page is checked against the script by the docs test suite.
Related walkthrough
Building Flows with Code is the shorter introduction to building and opening a graph. For individual operations, use the API reference.
Next: First steps