spacr.flowview.export

Deterministic, Qt-free SVG, HTML, and JSON exports for FlowView.

Functions

export(→ pathlib.Path)

Write a deterministic SVG, HTML, or JSON representation of graph.

render_html(→ str)

Render one self-contained HTML record containing SVG and inspector.

render_svg(→ str)

Render graph as a standalone SVG string with editable text.

Module Contents

spacr.flowview.export.export(graph: spacr.flowview.model.RunGraph, path: str | os.PathLike[str], fmt: str = 'svg') → pathlib.Path[source]

Write a deterministic SVG, HTML, or JSON representation of graph.

Parameters:
  • graph – the run snapshot to export.

  • path – destination file, overwritten with the UTF-8 encoded output. Its suffix is not consulted; fmt alone picks the format.

spacr.flowview.export.render_html(graph: spacr.flowview.model.RunGraph) → str[source]

Render one self-contained HTML record containing SVG and inspector.

Parameters:

graph – the run snapshot to render; its SVG drawing, run id, spaCR version, settings digest and one inspector section per node are embedded in the page.

spacr.flowview.export.render_svg(graph: spacr.flowview.model.RunGraph) → str[source]

Render graph as a standalone SVG string with editable text.

Parameters:

graph – the run snapshot to draw; nodes are placed by layout_graph() and edges are drawn beneath them.