Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create UML Diagrams in Pycharm Community Edition?

Tags:

pycharm

uml

Is it that one can you only create class diagrams in Pycharm Professional Edition? I have Pycharm Community Edition 2019.2 and I have installed the PlantUML plugin and Graphviz, also set the environment variables as required but still I cant create the Class diagram.

like image 628
Prachi Avatar asked Nov 20 '19 07:11

Prachi


2 Answers

Based on searching online, I think the specific answer to your question is yes, you can only use the integrated UML plugins for Professional Edition. To do it for Community Edition, as Dinko said you would have to use the 3rd party plugin PlantUML.

like image 191
jwcoder Avatar answered Oct 01 '22 19:10

jwcoder


Generating UMLs from class in PyCharm is included by default. Maybe you have disabled them. Go to File -> Settings -> Plugins and search UML. There should be Python UML diagrams and UML which should have bundled keyword written below.

You can right click on class and and choose Diagrams to generate it.

For example, this class:

class Person:

    def __init__(self, name, age):
        self.name = name
        self.age = age

is represented as this:

Example diagram


For PlantUML plugin, you don't have to install anything except the plugin itself. When you install it, you can create new PlantUML file and select default diagram to be generated.

like image 26
Dinko Pehar Avatar answered Oct 01 '22 21:10

Dinko Pehar