Toggle Menu
Prev Up Next

# `langchain_core.runnables.graph_mermaid`.draw_mermaid_png

langchain_core.runnables.graph_mermaid.draw_mermaid_png(mermaid_syntax: str, output_file_path: Optional[str] = None, draw_method: MermaidDrawMethod = MermaidDrawMethod.API, background_color: Optional[str] = 'white', padding: int = 10) → bytes

  Draws a Mermaid graph as PNG using provided syntax.

  Parameters

    - mermaid_syntax (str) –

    - output_file_path (Optional[str]) –

    - draw_method (MermaidDrawMethod) –

    - background_color (Optional[str]) –

    - padding (int) –

  Return type

    bytes