Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

1.3 KiB

id title
installation Installation

It requires Python 3.6 or higher, check your Python version first.

It uses Graphviz to render the diagram, so you need to install Graphviz to use diagrams. After installing graphviz (or already have it), install the diagrams.

macOS users can download the Graphviz via brew install graphviz if you’re using Homebrew. Similarly, Windows users with Chocolatey installed can run choco install graphviz.

# using pip (pip3)
$ pip install diagrams

# using pipenv
$ pipenv install diagrams

# using poetry
$ poetry add diagrams

Quick Start

# diagram.py
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Web Service", show=False):
    ELB("lb") >> EC2("web") >> RDS("userdb")

This code generates below diagram.

$ python diagram.py

web service diagram

It will be saved as web_service.png on your working directory.

Next

See more Examples or see Guides page for more details.