Visualization¶
Exporters that render a flow's topology as Mermaid or Graphviz DOT for docs and debugging.
viz
¶
Visualization helpers for PenguiFlow graphs.
flow_to_mermaid
¶
flow_to_mermaid(flow: PenguiFlow, *, direction: str = 'TD') -> str
Render the flow graph as a Mermaid diagram string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flow
|
PenguiFlow
|
The :class: |
required |
direction
|
str
|
Mermaid graph direction ( |
'TD'
|
flow_to_dot
¶
flow_to_dot(flow: PenguiFlow, *, rankdir: str = 'TB') -> str
Render the flow graph as a Graphviz DOT string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flow
|
PenguiFlow
|
The :class: |
required |
rankdir
|
str
|
Graph orientation ( |
'TB'
|