draw_mermaid_png(
mermaid_syntax: str,
output_file_path: str | None = None,
draw_method: MermaidDrawMethod| Name | Type | Description |
|---|---|---|
mermaid_syntax* | str | Mermaid graph syntax. |
output_file_path | str | None | Default: NonePath to save the PNG image. |
draw_method | MermaidDrawMethod | Default: MermaidDrawMethod.APIMethod to draw the graph. |
background_color | str | None | Default: 'white' |
padding | int | Default: 10 |
max_retries | int | Default: 1 |
retry_delay | float | Default: 1.0 |
base_url | str | None | Default: None |
proxies | dict[str, str] | None | Default: None |
Draws a Mermaid graph as PNG using provided syntax.
Background color of the image.
Padding around the image.
Maximum number of retries (MermaidDrawMethod.API).
Delay between retries (MermaidDrawMethod.API).
Base URL for the Mermaid.ink API.
HTTP/HTTPS proxies for requests (e.g. {"http": "http://127.0.0.1:7890"}).