4 ms·
from diagrams import Diagram from diagrams.aws.compute import EC2 with Diagram("Simple Diagram"): EC2("web") This has a very odd API. It's using (ab
by j4mie 4y ago
from diagrams import Diagram
from diagrams.aws.compute import EC2
with Diagram("Simple Diagram"):
EC2("web")
This has a very odd API. It's using (abusing?) context managers and contextvars to do weird spooky things that you could just as easily do with ordinary objects or functions.
- VectorLock 4y agoI think you can still use ordinary functions to string things together as well. I also don't like the abuse of context managers in this way.