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 runchoco install graphviz.macOS users using Homebrew can install Graphviz via
brew install graphviz. Similarly, Windows users with Chocolatey installed can runchoco install graphvizor use Winget viawinget install Graphviz.Graphviz -i.
After installing Graphviz (or if you already have it), install diagrams:
# using pip (pip3)
@@ -76,6 +76,9 @@
# using poetry
$ poetry add diagrams
+
+# using uv
+$ uv tool install diagrams
Quick Start
# diagram.py
@@ -93,6 +96,10 @@
This generates the diagram below:

It will be saved as web_service.png in your working directory.
+CLI
+With the diagrams CLI you can process one or more diagram files at once.
+$ diagrams diagram1.py diagram2.py
+
Next
-