HUB
Sign inSign up

mjdk/diagrams

By mjdk

•Updated over 2 years ago

Python Diagrams

Image
0

2.3K

mjdk/diagrams repository overview

⁠python-diagrams

Diagrams as code using Python and Diagrams

⁠Docker image

  • Update apt
  • Install graphviz - Diagrams requirement
  • Install diagrams

⁠Create diagram using container

⁠Sample script

hello-world.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("Hello World", show=False):
    ELB("Load Balancer") >> EC2("Message Server") >> RDS("Message Store")
⁠Run script using container
docker run -it --rm -v "$PWD":/diagrams/scripts/ -w /diagrams/scripts/ mjdk/diagrams hello-world.py
⁠View generated diagram in the scripts directory

Hello, World

⁠Read more

⁠License

MIT⁠

Tag summary
Recent tags
Content type
Image
Digest
sha256:5cf3b65ac…
Size
428.5 MB
Last updated
over 2 years ago
docker pull mjdk/diagrams:latest