bytewax.visualize
#
Visualize dataflow structure.
This most easily used via running this module as a script. Run python -m bytewax.visualize --help
or see Visualizing Structure for more
info.
Classes#
- class RenderedPort#
Port with streams resolved to globally-unique IDs.
- class RenderedOperator#
Operator with all ports resolved to globally-unique IDs.
- inp_ports: List[RenderedPort]#
- out_ports: List[RenderedPort]#
Functions#
- to_rendered(
- flow: Dataflow,
Convert a dataflow into the “rendered” data model.
This resolves all port links for you. All you have to do is set up the links by connecting
RenderedPort.port_id
to allRenderedPort.from_port_ids
.- Parameters:
flow – Dataflow.
- Returns:
Rendered dataflow.
- to_json(flow: Dataflow) str #
Encode this dataflow into JSON.
- Parameters:
flow – Dataflow.
- Returns:
JSON string.
- to_plantuml(flow: Dataflow, recursive: bool = False) str #
Generate a PlantUML diagram of a dataflow.
This most easily used via running this module as a script. Run
python -m bytewax.visualize --help
or see Visualizing Structure for more info.See the PlantUML website for more info on PlantUML.
- Parameters:
flow – Dataflow.
recursive – Wheither to show sub-steps. Defaults to
False
.
- Returns:
PlantUML diagram string.
- to_mermaid(flow: Dataflow) str #
Generate a Mermaid diagram of a dataflow.
This most easily used via running this module as a script. Run
python -m bytewax.visualize --help
or see Visualizing Structure for more info.See the Mermaid docs for more info on Mermaid.
Does not show any sub-steps.
- Parameters:
flow – Dataflow.
- Returns:
Mermaid diagram string.