25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1.3 KiB

id title
installation Installation

diagrams requires Python 3.7 or higher, check your Python version first.

diagrams uses Graphviz to render the diagram, so you need to install Graphviz to use it.

macOS users using Homebrew can install Graphviz via brew install graphviz . Similarly, Windows users with Chocolatey installed can run choco install graphviz.

After installing Graphviz (or if you already have it), install diagrams:

# 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")

To generate the diagram, run:

$ python diagram.py

This generates the diagram below:

web service diagram

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

Next

See more Examples or see the Guides page for more details.