Reverse engineer Python source code into UML class diagrams.
| 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.
- 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
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):
- Website and screenshots: www.pynsource.com
- Help is built into the app — press
F1 - Video tutorial and a module visualisation demo
- To control the initial window size and position, see this note
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.
Author: Andy Bulka
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.



