
This outputs the following PlantUML content: py2puml.domainĬlass. Once py2puml is installed at the system level, an eponymous command is available in your environment shell.įor example, to create the diagram of the classes used by py2puml, run: py2puml py2puml/domain py2puml.domain If you like tools related with PlantUML, you may also be interested in this lucsorel/plantuml-file-loader project:Ī webpack loader which converts PlantUML files into images during the webpack processing (useful to include PlantUML diagrams in your slides with RevealJS or RemarkJS). To generate image files, use the PlantUML runtime, a docker image of the runtime (see think/plantuml) or of a server (see the CLI documentation below)
Plant uml flow diagram code#
Plant uml flow diagram software#
You can easily create software application flow or any kind of application flow using plant UML. Py2puml outputs diagrams in PlantUML syntax, which can be: Learn to create sequence, flow diagrams easily without any drawing. Parsing abstract syntax trees to detect the instance attributes defined in _init_ constructors The detection of composition relationships relies on type annotations only, assigned values or expressions are never evaluated to prevent unwanted side-effects composition and inheritance relationships (between your domain classes only, for documentation sake).Software engineers and business experts use. static class attributes and dataclass fields A sequence diagram is a sort of interaction diagram that depicts how a set of items interacts and in what order.Inspection and type annotations to detect: Featuresįrom a given path corresponding to a folder containing Python code, py2puml processes each Python module and generates a PlantUML script from the definitions of various data structures using: Some parsing features are available only since Python 3.8 (like ast.get_source_segment). Py2puml internally uses code inspection (also called reflexion in other programming languages) and abstract tree parsing to retrieve relevant information. Py2puml produces a class diagram PlantUML script representing classes properties (static and instance attributes) and their relations (composition and inheritance relationships). Generate PlantUML class diagrams to document your Python application.
