Created
September 24, 2020 14:41
-
-
Save dylanroy/75fbb0b1f2cd1d4ab3413301aa24f23a to your computer and use it in GitHub Desktop.
Code snippets from Medium Blog Post "Create Beautiful Architecture Diagrams with Python"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diagrams import Cluster, Diagram | |
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub | |
from diagrams.gcp.compute import AppEngine, Functions | |
from diagrams.gcp.database import BigTable | |
from diagrams.gcp.iot import IotCore | |
from diagrams.gcp.storage import GCS | |
with Diagram("Media Monitoring Storage Architecture", show=False) as med_diag: | |
pubsub = PubSub("pubsub") | |
flow = Dataflow("DataFlow") | |
with Cluster("Data Collection"): | |
[Functions("RSS Feed Webhook"), | |
Functions("Twitter Webhook"), | |
Functions("Press Release")] >> pubsub >> flow | |
with Cluster("Storage"): | |
with Cluster("Data Lake"): | |
flow >> [BigQuery("BigQuery"), | |
GCS("Storage")] | |
with Cluster("Event Driven"): | |
with Cluster("Processing"): | |
flow >> AppEngine("GAE") >> BigTable("BigTable") | |
with Cluster("Serverless"): | |
flow >> Functions("Function") >> AppEngine("AppEngine") | |
pubsub >> flow | |
med_diag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment