mingrammer /diagrams

:art: Diagram as Code for prototyping cloud system architectures

★ 42,801⑂ 2,728👁 395⑃ 666● 551▤ 46◈ 47
PythonMITCreated 2020-02-02diagrams.mingrammer.com
42,801
stars
+2
2,728
forks
395
watchers
666
prs
551
issues
46
releases
47
discussions

README

!diagrams logo

 Diagrams



!python version
!Run tests

!contributors



Diagram as Code.

Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture design without any design tools. You can also describe or visualize the existing system architecture as well. Diagrams currently supports main major providers including: AWS, Azure, GCP, Kubernetes, Alibaba Cloud, Oracle Cloud etc... It also supports On-Premises nodes, SaaS and major Programming frameworks and languages.

Diagram as Code also allows you to track the architecture diagram changes in any version control system.

  NOTE: It does not control any actual cloud resources nor does it generate cloud formation or terraform code. It is just for drawing the cloud system architecture diagrams.

 Providers

!aws provider
!azure provider
!gcp provider
!ibm provider
!kubernetes provider
!alibaba cloud provider
!oracle cloud provider
!openstack provider
!firebase provider
!digital ocean provider
!elastic provider
!outscale provider
!on premises provider
!generic provider
!programming provider
!saas provider
!c4 provider

 Getting Started

 Want to try it first? The online playground runs diagrams right in your browser — no installation required.

It requires Python 3.9 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.

shell
 using pip (pip3)
$ pip install diagrams

 using pipenv
$ pipenv install diagrams

 using poetry
$ poetry add diagrams


You can start with quick start. Check out guides for more details, and you can find all available nodes list in here.

 Playground

diagrams.mingrammer.com/playground

A free online editor for diagrams: write Diagram as Code in Python and see the rendered architecture diagram instantly, without installing Python or Graphviz. It runs the real diagrams package in your browser via Pyodide, and supports node search, autocompletion, PNG/SVG/JPEG export, and shareable links. See the playground guide for details.

 Examples

| Event Processing                                             | Stateful Architecture                                        | Advanced Web Service                                         |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| !event processing | !stateful architecture | !advanced web service with on-premises |

You can find all the examples on the examples page.

 Contributing

To contribute to diagram, check out contribution guidelines.

 Let me know if you are using diagrams! I'll add you in showcase page. (I'm working on it!) :)

 Who uses it?

Apache Airflow is the most popular data 

Top issues

Discussions

Latest release

v0.25.1 v0.25.1 2025-11-22
What's Changed
 fix: missing logos in v0.25.0 by adding build-system configuration by @Copilot in https://github.com/mingrammer/diagrams/pull/1187

 New Contributors
 @Copilot made their first contribution in https://github.com/mingrammer/diagrams/pull/1187

Full Changelog: https://github.com/mingrammer/diagrams/compare/v0.25.0...v0.25.1

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON