Skip to main content

Lightweight AWS Diagram Automation

Project description

draws: lightweight AWS Diagram Automation

draws is a dependency-free tool for automating AWS architecture diagram creation.

Example AWS architecture diagram generated by draws from AppSync GraphQL DynamoDB template Example AWS architecture diagram generated by draws from S3 trigger template Example AWS architecture diagram generated by draws from serverless backend stack template

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


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)

Uploaded Source

Built Distribution

draws-1.0.0a2-py3-none-any.whl (534.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page