Skip to content
Documentationst_flowst_flow

st_flow : Streamlit Widget

st_flow is a Streamlit widget that serves as a graphical interface for creating flow schemas. It provides an API that clients can access. Running the Streamlit app with the st_flow widget launches the barfi GUI on the frontend, as shown below.

Flow Editor UI

Within Barfi, the component interface is called the Flow-Editor. Right-clicking on the Flow-Editor opens a context menu where you can add Blocks and connect them to build your flow.

st_flow Implementation Example

The st_flow widget takes the base blocks and returns a response from the editor.

app.py
from barfi.flow.streamlit import st_flow
 
# 01: Create a flow schema
barfi_response = st_flow(blocks = my_blocks)