Analyses source code of python implementations (files, classes, modules) and creates pumla architecture elements (re-usable PlantUML).
In concrete, py2pumla does:
- scan a path recursively and find all python implementation files
- generate architecture PlantUML/pumla diagrams for the pyhton source code showing the implementation elements and their dependencies.
First, you have to set the pumla_path
in the py2pumla.py
file to the path of the pumla repository on your
computer.
Then execute from the py2pumla
home directory the following command to
generate the PlantUML pumla files:
python3 py2pumla.py ./example
for the following example Python file: ./example/PElement.py
This file represents a Python module, therefore the following re-usable pumla file gets generated:
./example/_generated_p2p_pumla/pelementModule.puml
The file contains 2 functions and one class definition.
For the functions part the following re-usable pumla file gets generated: ./example/_generated_p2p_pumla/PElementModFuncs.puml
And for the class definition this re-usable pumla file gets generated: ./example/_generated_p2p_pumla/pelementClass.puml
Furthermore, the following overview on the module is generated, that includes all generated pumla elements that describe the module: ./example/_generated_p2p_pumla/allElementsOverview.puml
... which leads to this nice overview diagram:
The descriptions of the classes, methods and functions as notes are derived from the pydoc strings.
- pumla >= v0.5 (for reference see chapter below)
- Linux, MacOs (>= v10.14.6)
- Python >= v3.7
- PlantUML
This overview on the low level architecture of py2pumla
was generated by executing
python3 py2pumla.py ./
in py2pumla
's home directory.
See here for a reference to pumla: