Create infrastructure diagrams from configuration files (YAML and JSON) by using Graphviz
Project description
infrastructure-diagrams
infrastructure-diagrams is a python package that allows creating
infrastructure diagrams/graphs from configuration files (YAML and JSON).
The package utilizes Graphviz <https://www.graphviz.org/>
__ to
generate the diagrams. The functionality is exposed in the command line
by the Unix command file.
Note: Some features are currently undocumented.
Requirements
The package requires python >= 3.6
. It has only been tested on Linux
as the intended use was for automatically generating diagrams in a CI.
Installation
The current stable version of infrastructure-daigrams is available on
pypi and can be installed by running
pip install infrastructure-diagrams
.
Other sources:
- pypi: http://pypi.python.org/pypi/infrastructure-diagrams/
- github: https://github.com/kotlarz/infrastructure-diagrams/
Usage
.. code:: bash
$ infrastructure-diagrams
usage: infrastructure-diagrams [-h] [-d DISPLAY] [-o OUTPUT] [-r RENDERER] file
positional arguments:
file path to diagram file
optional arguments:
-h, --help show this help message and exit
-d DISPLAY, --display DISPLAY
display the diagram after rendering
-o OUTPUT, --output OUTPUT
output path for the diagram, including filetype (.svg, .png, etc.)
-r RENDERER, --renderer RENDERER
output renderer used for rendering (cairo, gd, etc.)
Example:
$ infrastructure-diagrams -o example.png examples/example.yaml
Configuration files
The configuration files extend the Graphviz Node, Edge and Graph Attributes <https://www.graphviz.org/doc/info/attrs.html>
__, meaning
you can customize the diagram / graph as needed.
Examples:
-
example.yaml
|Output of example.yaml| -
misc.yaml
|Output of misc.yaml| -
iot.yaml
|Output of iot.yaml|
Example diagram configuration files can be found under the
examples/ <https://github.com/kotlarz/infrastructure-diagrams/>
__
directory.
.. |Output of example.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/example.png .. |Output of misc.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/misc.png .. |Output of iot.yaml| image:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/iot.png
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for infrastructure-diagrams-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9ee03ceb22e1c1d2cf75d446422d95401ba0c8f445d6b7f344dc1645852170b |
|
MD5 | a8d267ac7822dcef172192e284c725e0 |
|
BLAKE2b-256 | dbed491d6c53014972bdb4475e82f970309c33ad89f7329f57f22dc7ea13dde8 |
Hashes for infrastructure_diagrams-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1410171cc3c658689903fce80994acaf63f917374a6b78ffe753e8bf0161d8e |
|
MD5 | 964e58a8d7eefadb0f381c9ecac9bc64 |
|
BLAKE2b-256 | 27028678ec3937517f817f97f991fbff18b6607fe2f48da3981bfa6886ed3b42 |