diagrams icon indicating copy to clipboard operation
diagrams copied to clipboard

Alternate API without context manager and redefined operators ?

Open rbarzic opened this issue 2 years ago • 1 comments

Diagrams is a great library and I want to use it to represent the structure of a class/instance hierarchy directly from the original Python code (so I need to build the diagram dynamically). The use of context makes it difficult to build dynamically the expected diagram (maybe because of my lack of deep knowledge of the way context is working). So I was wondering if it was possible to build a diagram with a more "direct" API like:

c1 = Cluster("Top) w1 = ECS("worker1") w2 = ECS("worker2") c1.add( w1) c1.add( w2) connect(c1,c2) or similar

rbarzic avatar Feb 25 '22 10:02 rbarzic

Looks like I didn't search with the right keywords: Found this link that may help me https://github.com/hisham-elbreky/diagram-automation

rbarzic avatar Feb 25 '22 18:02 rbarzic