Diagrams

0.25.1 · active · verified Thu Apr 09

Diagrams is a Python library that allows users to draw cloud system architectures and other technical diagrams as code. It leverages Graphviz to render visual representations, enabling version-controlled, reproducible, and dynamic documentation for multi-cloud deployments (AWS, Azure, GCP, Kubernetes, etc.), on-premise solutions, and more. Currently at version 0.25.1, the library maintains an active release cadence with frequent updates adding new icons and features.

Common errors

Warnings

Install

Imports

Quickstart

This example generates a simple AWS web application diagram, saving it as 'simple_web_app.png' in the current directory without automatically opening the image.

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.storage import S3

with Diagram("Simple Web Application", show=False, filename="simple_web_app"):
    web_server = EC2("Web Server")
    database = RDS("Database")
    static_storage = S3("Static Content")

    web_server >> database
    web_server >> static_storage

view raw JSON →