Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 621 Bytes

classdiagrams.md

File metadata and controls

10 lines (7 loc) · 621 Bytes

Class Diagrams in Python

Sometimes I would like to look at class diagrams, and not scroll through my code. What I just learned: pylint actually ships with pyreverse to do just that:

pyreverse -o <FORMAT>  my_package[.my_module] -d <OUTPUT_DIRECTORY>

creates class diagrams in dot, PlantUML puml and MermaidJS mmd (or anything graphviz can handle). For a quick look, it is e.g. possible to create a skeleton with pyreverse, copy this (cat classes.mmd | pbcopy) into mermaid.live and export what you want to show.