A modern, minimal Python MVP (Model-View-Presenter) application template using imgui_bundle for GUI rendering.
- ✨ Clean MVP architecture
- 📊 Example: interactive calculator panel
- 🔍 Data modeling with
dataclass - 🧵 Background processing with thread pool
- 📁 File dialog and CSV support
- 🧱 ImGui docking and multi-panel layout
- 📂 Project loading via project specification file
- ⚙️ Context manager
- 💾 Saving and loading UI layout
- Python ≥ 3.9
- Recommended: use a virtual environment (uv)
After you clone the repository and go to it, you should write:
uv venv
uv venv execInstall dependencies:
pip install -r requirements.txtpython main.pyMake sure you're in the project root directory, and the virtual environment (if any) is activated.
.
├── app.py # App manager & setup
├── main.py # App entry point
├── data/ # Holds global data
├── models/ # Business logic
├── presenters/ # binds panel and logic
├── views/
├── utils/
│ ├── file_dialog.py # File dialog controller
│ ├── logger.py # Logging wrapper
│ └── thread_pool.py # Async task management
An example panel that supports:
- Float inputs (
a,b) - Operator selection (
+,-,*,/,^) - Live computation via ViewModel
- CSV loading capability
To add a new module:
- Create a data model in
data/ - Implement business logic in
models/ - Write a ViewModel in
viewmodels/ - Create a Panel view in
views/ - Register it inside
App.setup_panels()
- Separation of concerns (MVP)
- Easy to extend with new panels
- Async-safe design
- Clean and modular Python
Built by SirJamesClarkMaxwell