Lightweight AWS Diagram Automation
Project description
draws: lightweight AWS Diagram Automation
draws is a dependency-free tool for automating AWS architecture diagram creation.
Install
pip install draws
Example Usage (from template)
import os
from pathlib import Path
from draws import Diagram
if __name__ == "__main__":
curr_dir = Path(os.path.abspath(os.path.dirname(__file__)))
templates_dir = curr_dir / "cdk.out"
D = Diagram.from_template(
filename=templates_dir / "my-stack.template.json",
title="My AWS Stack",
)
D.to_svg()
Example Usage (manual)
import os
from pathlib import Path
from draws import Diagram, Elem
if __name__ == "__main__":
with Diagram(title="My AWS Stack") as D:
rest_api = Elem("AWS::ApiGateway::RestApi", "Rest API")
lambda_func = Elem("AWS::Lambda::Function", "Lambda")
bucket = Elem("AWS::S3::Bucket", "Bucket")
rest_api >> lambda_func
rest_api << lambda_func
lambda_func >> bucket
D.to_svg()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
draws-1.0.0a2.tar.gz
(389.5 kB
view hashes)
Built Distribution
draws-1.0.0a2-py3-none-any.whl
(534.2 kB
view hashes)