使用 Graphviz 从配置文件(YAML 和 JSON)创建基础架构图
项目描述
基础架构图
Infrastructure-diagrams 是一个 python 包,允许从配置文件(YAML 和 JSON)创建基础结构图/图形。该包使用Graphviz <https://www.graphviz.org/>
__ 来生成图表。该功能通过 Unix 命令文件在命令行中公开。
注意:某些功能目前未记录在案。
要求
该软件包需要python >= 3.6
. 它仅在 Linux 上进行了测试,因为预期用途是在 CI 中自动生成图表。
安装
pypi 上提供了当前稳定版本的基础设施-daigrams,可以通过运行
pip install infrastructure-diagrams
.
其他来源:
- pypi:http://pypi.python.org/pypi/infrastructure-diagrams/
- github:https ://github.com/kotlarz/infrastructure-diagrams/
用法
.. 代码:: 重击
$ 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.)
例子:
$ infrastructure-diagrams -o example.png examples/example.yaml
配置文件
配置文件扩展了 Graphviz Node, Edge and Graph Attributes <https://www.graphviz.org/doc/info/attrs.html>
__,这意味着您可以根据需要自定义图表/图形。
例子:
-
example.yaml
|example.yaml 的输出| -
misc.yaml
|misc.yaml 的输出| -
iot.yaml
|iot.yaml 的输出|
示例图表配置文件可以在
examples/ <https://github.com/kotlarz/infrastructure-diagrams/>
__ 目录下找到。
.. |example.yaml 的输出| 图片:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/example.png .. |misc.yaml 的输出| 图片:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/misc.png .. |iot.yaml 的输出| 图片:: https://raw.githubusercontent.com/kotlarz/infrastructure-diagrams/master/examples/iot.png
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
内置分布
Infrastructure_diagrams- 0.0.6 -py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e1410171cc3c658689903fce80994acaf63f917374a6b78ffe753e8bf0161d8e |
|
MD5 | 964e58a8d7eefadb0f381c9ecac9bc64 |
|
布莱克2-256 | 27028678ec3937517f817f97f991fbff18b6607fe2f48da3981bfa6886ed3b42 |