This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation.<p>Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.<p>1: <a href="https://plantuml.com/" rel="nofollow">https://plantuml.com/</a>
I was hoping this tool would support directionality/sequencing of nodes.<p>A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose.<p>I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool right now due to flexibility, but it's a closed-source/paid product, so I'm open to alternatives.<p>[0] <a href="https://whimsical.com/" rel="nofollow">https://whimsical.com/</a>
Slightly different, but there is now an VSCode extension to use draw.io directly in the editor.<p><a href="https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio" rel="nofollow">https://marketplace.visualstudio.com/items?itemName=hediet.v...</a><p>If you don't know draw.io, it's an free diagram software that not only has an XML format to save them, but can also be used to save it as a PNG that EMBEDS said XML, so you can edit it again, but display it like a regular image.
The author has made DSL in Python by (ab?)using context managers and the bitshift operator. It's very interesting, and I haven't seen anything quite like it.<p>Python can lend itself to horrific abuses through shenanigans like this. I sometimes feel that siren call myself, and usually regret it.<p>So by default I'm pretty skeptical of this kind of thing, but I'm actually on the fence about this one.
I have been thinking about using this for some diagrams, but whats been on the back of my mind since I heard about it is how to combine it with Terraform, or Troposphere, and have your infrastructure as code also draw the diagrams automatically.
This is cool! I was hoping it would look something like:<p>‘’’
import diagrams
calc_d = diagrams.new_diagram(“calculator_123”)<p>calc_d.Datum("SuperNumber")
class SuperNumber(int):
pass<p>@calc_d.Service(“Calculator”, “takes numbers and operations and operates”)
class Calculator(object):
@calc_d.Endpoint("Add", calls=["Increment"], main_data={"b": "SuperNumber})
def add(self, a, b: SuperNumber):
out = a
for i in range(b):
calc_d.multi(calls=["Increment"])
out = self.increment(out)<p><pre><code> @calc_d.Function("Increment")
def increment(self, a):
return a+1
</code></pre>
def integration_test():
calc_d.instantiate("Calculator")
calc = Calculator()
...
‘’’<p>EDIT: Dear dang and YC Hacker News, I would love to create code blocks using surrounding triple quotes..
It seems to be hyperfocused on system architecture diagrams.<p>There are some other kinds of diagrams would we like to draw that’s not system architecture diagrams, eg:<p>- algorithms<p>- decision trees<p>- UML/ER Diagrams<p>Mermaid (JS) helps draw quality diagrams quickly - more than system architecture diagrams.<p>It would have been perfect if the development cycles that went here was used to create Mermaid templates instead.<p>Unless this also lets us draw more than just system architecture diagrams.
Why do we need a tool to draw its architecture and we don't have a tool which auto discover the architecture and auto updates it and draw it form here ?<p>That will shrink the gap between the current architecture and the current diagram that almost always exists
I just created a Dockerfile to run: <a href="https://github.com/skhaz/diagrams" rel="nofollow">https://github.com/skhaz/diagrams</a>
When I was ~10yrs old, I would play with a program called RPG Maker 2000. It had a really interesting code system where you could click blocks of code and it would bring up a UI for modifying them. It was always simple stuff like if/else, for, switch.. but it merged the simplicity of clicking dropdowns and the like with the complexity of actually seeing the code and learning to read and navigate it. You could also go rogue and write custom code.<p>I still think that this solution has more life to it and would like to explore that some day.
Slight tangent, but some of the cool tools noted in the comments remind me of some of the amazing things put out by Netflix engineering in recent years, like Vizceral^1 and Flux^2.<p>1. <a href="https://github.com/Netflix/vizceral/wiki" rel="nofollow">https://github.com/Netflix/vizceral/wiki</a><p>2. <a href="https://link.medium.com/LY2vw4Rsr6" rel="nofollow">https://link.medium.com/LY2vw4Rsr6</a><p>(Sorry about the Medium.com link; all I could grab on the spot on phone)
When I first read this I thought this did the inverse of what it actually does. Let you interactively draw out diagrams then it would generate the boilerplate code to achieve that diagram.
I've got a similar project which takes a diagram of your infrastructure, such as [1] and runs the diagram to build your devops infrastructure [2].<p>[1]: <a href="http://devops-pipeline.com/architecture.tb.png" rel="nofollow">http://devops-pipeline.com/architecture.tb.png</a>
[2]: <a href="http://devops-pipeline.com/" rel="nofollow">http://devops-pipeline.com/</a>
I was recently looking for something similar, allowing me to draw network diagrams using text or code. I came across [0] which looks great, but has some rough corners and seems to be abandoned by he author. Does anyone have any other recommendations for more bare-metal oriented topologies?<p>[0] <a href="http://go.drawthe.net/" rel="nofollow">http://go.drawthe.net/</a>
If you are interested in this kind of thing please check out the blockdiag series of tools (seqdiag, rackdiag, netdiag, etc) I haven't looked back since I started using them other than a workplace that uses lucidchart.<p><a href="http://blockdiag.com/en/" rel="nofollow">http://blockdiag.com/en/</a>
> from diagrams import Diagram<p>Slightly off-topic, but I wish JavaScript's import syntax was designed to be this way around, for better autocomplete in your editor.
Why the obsession with product names and logos? Having a Python class for a specific product is not necessary.<p>...and then people talk about CV-driven development...
This looks pretty cool and has as nice modern look to it. I can see did a good job with the layout/design too.<p>If you don't mind sharing (or if anyone knows of any toolkits/libraries): I wanted to try getting at drawing some custom diagrams and was unsure where to begin coding just project. Any know of anything that comes to mind?
this is going to send me down a rabbit hole for a long long time .... there was another thread some months ago about an architecture diagraming tool that reads the code and outputs architecture based on methods.
Why is this better than Mermaid? It works in Markdown, you can version control, and Git(Hub|Lab) displays it automatically.<p>I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.