Skip to content
abulkaPublic

About

Reverse engineer Python source code into UML

Resources

Stars

305 stars

Watchers

8 watching

Forks

Repository files navigation

Pynsource

Reverse engineer Python source code into UML class diagrams.

latest release license website

Screenshot of Pynsource showing a UML class diagram

Install

macOS (Apple silicon) brew install --cask abulka/pynsource/pynsource — or download the zip
Windows 10/11 (64-bit) download pynsource-win-<version>-setup.exe and run it
Linux (AppImage) download …-x86_64.AppImage or …-aarch64.AppImage (uname -m)
Ubuntu/Debian (snap) sudo snap install pynsource

Full instructions, including the one-off Gatekeeper (macOS) and SmartScreen (Windows) prompts and Linux troubleshooting: DOWNLOADS.md.

Viewing and editing diagrams is free. The Pro features (zoom, drag-to-connect, module visualisation) need a licence on macOS and Windows — they are free on Linux.

Building from source: BUILDING.md.

Features

  • Generates UML diagrams from Python 3 source
  • The only UML tool that recognises Python instance attributes (not just class attributes)
  • Type annotation support
  • Layout algorithm, and a toggle between UML, ASCII-art UML and PlantUML views
  • Automatically colours sibling subclasses to make inheritance easier to follow
  • Print and print preview
  • Runs on macOS, Windows and Linux

Pro Edition adds:

  • Zoom, and drag-and-drop to connect shapes
  • Faster (re)layout, and access to the generated PlantUML markup
  • Module visualisation, including variables and functions (youtube demo) — free on Linux

Examples

Zoom and line editing

Drag to connect shapes

ASCII-art UML view:

                               +-----------------------+
+-------------------+          |RoleServicesObject     |
|AI                 |          |.......................|
|....................        * |role                   |
|roleServiceObjects '''''''''''|gameservices           |----- .|
|gameServices       |___       |_rolemanager           |       |
|...................|   |      |_etc1                  |       |
|API_RunABit        |   |      |.......................|       |
|API_GetOrdersForR  |   |      |API_GetCurrentStoryline|       |
|API_CreateRoleServc|   |      |API_GetCurrentRoleName |       |
+-------------------+   |      |API_GetRoleSubordinates|       |
                        |      +-----------------------+       |
                        | 1 +---------------------------+ /    |
                        .---+GameServices               |_.....'
                            +---------------------------| -.
                            |_scenario                  |
                            |_game                      |
                            ............................|
                            |API_GetAstarTravelTimeBlah |
                            |API_GetOobtreeInfoOnOobId  |
                            +---------------------------+

PlantUML view (needs an internet connection, or your own PlantUML server):

PlantUML view

Learn more

What does Pynsource mean?

Py = Python, N = and, Source = source code. Longer answer: it was built in Australia, famous for meat pies with sauce at the football — Pie-and-Sauce.

Credits

Author: Andy Bulka

License

The Community Edition is open source, GPL3 licensed. The Pro Edition is commercially licensed and needs a valid licence on macOS and Windows. See CHANGELOG.md for the history.

About

Reverse engineer Python source code into UML

Resources

Stars

305 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages