Python can be used to both create diagrams using the GraphViz system.
The default extension of a GraphViz file usually either dot or gv.
There are several Python packages to support GraphViz.
The more simple Python
graphviz package will be used here. The web site is
https://pypi.org/project/graphviz/ (as of 2020-04-06). One way to install the
graphviz package is as follows.
D:\Python38\Scripts\pip3.exe install graphviz
Use the path to your installed version of Python.
The feedback while installing should look something like the following (as of 2020-04-06).
Collecting graphviz
Downloading graphviz-0.13.2-py2.py3-none-any.whl (17 kB)
Installing collected packages: graphviz
Successfully installed graphviz-0.13.2
Here is the Python code [#1]
Here is the output of the Python code.