-
Notifications
You must be signed in to change notification settings - Fork 0
Python Jupyter Helper
ChiefVenzox edited this page Jun 5, 2026
·
1 revision
NotebookFlowKit includes a small Python helper for authoring flows in Python or Jupyter notebooks.
The helper is located at:
Python/notebook_flow.py
from notebook_flow import NotebookFlow
flow = NotebookFlow("StarterFlow")
flow.text(
"welcome",
title="Welcome",
subtitle="Let's personalize your app",
next="goal",
)
flow.choice(
"goal",
title="What is your goal?",
options=["Focus", "Fitness", "Learning"],
next="name",
)
flow.input(
"name",
title="What should we call you?",
next="done",
)
flow.completion(
"done",
title="You're ready",
subtitle="Your setup is complete",
)
flow.export("starter_flow.json")flow.text(id, title, subtitle=None, next=None)flow.choice(id, title, options, subtitle=None, next=None, required=True)flow.multi_choice(id, title, options, subtitle=None, next=None, required=True)flow.input(id, title, subtitle=None, placeholder=None, next=None, required=True)flow.completion(id, title, subtitle=None)flow.export("starter_flow.json")Pass a Python dictionary as next to create answer-based routing.
flow.choice(
"goal",
title="What is your goal?",
options=["Focus", "Fitness", "Learning"],
next={
"Fitness": "fitness_setup",
"Learning": "learning_setup",
"default": "focus_setup",
},
)A typical notebook workflow:
- Define flow screens in notebook cells.
- Export JSON with
flow.export(...). - Add the exported JSON file to your app bundle.
- Render the flow in SwiftUI with
NotebookFlowView.