PlantUML: Create a sequence diagram inside PyCharm

Written by

For many years, I was looking for an app to create sequence diagrams without hair-pulling. One day, I found PlantUML.

During a recent work, one colleague gave me the best solution I found so far. PlantUML

By default, PlantUML is a java application. For any changes, the diagram image file needs to be regenerated via a shell command. From my experience, it was a bit time consuming.

Luckily, PlanUML is also available directly from PyCharm as a plug-in.

Install plantuml plugin for PyCharm: https://plugins.jetbrains.com/plugin/7017-plantuml-integration

Then click on Invalidate/Restart PyCharm.

Create a new puml file with an example content

https://plantuml.com/en/sequence-diagram

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

Make a change and the visual will be updated automatically

You can also create more advanced diagrams. Like this one created for a previous work.