Build dense architecture diagrams that validate their layout with Python.
Project details
open-diagram offers Python building blocks for creating dense architecture diagrams with self-validating layouts. Users can easily define panels, tiles, and connections, while the tool checks for layout mistakes before rendering. Output formats include both SVG and PNG, ensuring high-quality visualizations for software systems, data models, and more.
open-diagram is a Python library designed for creating dense architecture diagrams that automatically check their own layout. It allows users to generate visually appealing and precise diagrams by providing a simple scripting interface.
With open-diagram, users can create various types of diagrams including software systems, release pipelines, layered stacks, data models, and business processes. The intuitive API enables the definition of panels, tiles, lines, and groups in a concise Python script, allowing for quick construction and layout validation.
Create a simple diagram illustrating how a search request is processed:
from open_diagram import Diagram, Panel, Tile
d = Diagram("How a search request is answered", tag="EXAMPLE")
app = d.add(Panel("Web app", ["Search box", "Results page", "Filters"], footer="Owner: Web team"))
api = d.right_of(app, Panel("Search API", [Tile("Checks access"), Tile("Caches results", status="building")],
footer="Owner: Platform team"), align="center")
index = d.right_of(api, Panel("Search index", ["Product text", Tile("Spelling fixes", status="planned")],
status="planned"), align="center")
d.link(app, api)
d.link(api, index, kind="planned", label="new")
d.save("quickstart") # writes quickstart.svg and quickstart.png
Explore various implementations and example scripts available in the examples/ directory and the online gallery.
open-diagram offers a robust solution for developers and designers looking to streamline the creation of complex diagrams with a focus on precision and ease of use. Through automated layout checking and AI compatibility, it facilitates a productive design process.
Comments
0Start the conversation
Share the first comment.