Skip to main content

llm-draw

PyPI version Python versions

Generate diagram source from natural-language prompts using LLMs.

llm-draw infers the diagram type and output format from your prompt, then returns Mermaid, PlantUML, draw.io XML, or Markdown diagram text.

Install

Install from PyPI:

python -m pip install "llm-draw[openai]"

Other extras are available for specific integrations:

python -m pip install "llm-draw[langchain]"

Example

import os

from llm_draw import LlmDraw

client = LlmDraw(provider="openai")
result = client.generate(
    prompt="Show a web app with browser, API, PostgreSQL, Redis, and Stripe.",
    apikey=os.environ["OPENAI_API_KEY"],
    model_id="gpt-4.1-mini",
)

print(result.content)
print(result.diagram_type, result.output_format)

CLI

export OPENAI_API_KEY="..."

llm-draw \
  "Draw a payment workflow with fraud checks and refund handling" \
  --model-id gpt-4.1-mini \
  --output workflow.mmd

llm-draw writes inferred metadata to stderr and writes diagram source to stdout, unless --output is provided.

Supported Diagrams

  • Architecture, system architecture, network, AWS, Azure, GCP, Kubernetes, Terraform
  • Flowchart, process flow, workflow, process map, BPMN, swimlane, state, sequence
  • ERD, UML, use case, block, data flow, user flow, user journey map, org chart
  • Mermaid editor and PlantUML editor modes

Metadata

Release files for llm-draw 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-draw 0.1.2
File Size Uploaded Provenance Actions
llm_draw-0.1.2.tar.gz 12.6 kB Without provenance Details for llm_draw-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-draw 0.1.2
File Interpreter ABI Platform Actions
llm_draw-0.1.2-py3-none-any.whl Python 3 none any Details for llm_draw-0.1.2-py3-none-any.whl

Total release size: 28.4 kB

Release files / llm_draw-0.1.2.tar.gz

Download URL llm_draw-0.1.2.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1b6e674c0108137a7e0c860868b4f8504146974be6f0d4f260fd5c8744b67eb2
BLAKE2b-256 checksum
How to use checksums
5af990426a191cbbd33ed2183b15e17ac8875fa6540c80be5e7f73bfa56bd7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / llm_draw-0.1.2-py3-none-any.whl

Download URL llm_draw-0.1.2-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e92f9c01a475ec9613deb028b8bad0067895eafb4a2d43a1c999fad82dbde82f
BLAKE2b-256 checksum
How to use checksums
b6e13392d9fa659327aa12af35b2eea09a13a8dc9e28fec7f1078c54a6d5f0a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for llm-draw 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page