Can you suggest a free software or open source library that automatically draw a UML given Python source code as input?
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.– Community BotCommented Dec 29, 2021 at 14:55
-
I am really sorry, can someone explain what's wrong with my question, please? I will be very glad to edit it accordingly. It seems very specific to me. Thanks!– blunovaCommented Dec 29, 2021 at 14:58
-
Perhaps that cannot exist, because Python's object model is probably incompatible with UML. However, Python has AST, and if your code is following some documented guidelines, you might make such a tool yourself.– Basile StarynkevitchCommented Dec 30, 2021 at 16:06
2 Answers
I found links to several python-specific open-source alternatives for UML generation from source code here. The Communnity version is still free, open-sourced, and full-featured.
The one that has been updated most recently is Pynsource. The description for the original link reads: "Reverse engineer python source code into UML. Generated UML class diagrams can be displayed as ASCII Art or in a more typical graphical form. After a few years in a zombie state, we have just seen a new and improved version this 2019."
Pyreverse could be a solution as stated here:
Pyreverse is a tool in the Pylint tool suite. Pyreverse is a tool for generating UML diagrams from Python source code.
It can be easily run in the following way:
pyreverse -o png my_class.py