OPAQUE - Opinionated Python Application with Qt UI for Engineering. A flexible MDI application framework for PySide6.
Reason this release was yanked:
critical bug found...
Project description
OPAQUE Framework
OPAQUE - Opinionated Python Application with Qt UI for Engineering
A flexible, modern MDI (Multiple Document Interface) application framework built on PySide6, designed for creating professional desktop applications with enterprise-grade features.
🚀 Key Features
- MVP Architecture: Clean separation of concerns (Model-View-Presenter).
- MDI Interface: Manage multiple feature windows within a single application.
- Built-in Services:
- Notification System: Non-intrusive toast notifications and a centralized notification center.
- Console System: Real-time capture and display of stdout/stderr for debugging.
- Logging: Structured logging with file and console output.
- Settings & Persistence: Automatic saving/loading of application settings and window states.
- Theme Support: Dark/Light mode support.
- Professional Widgets:
CloseableTabWidget,ColorPicker, and more. - Build System: Tools to package your app as a standalone executable (PyInstaller/Nuitka).
📦 Installation
pip install opaque-framework
For development:
pip install "opaque-framework[dev]"
🏁 Quick Start
1. Bootstrap Your Application
Create a main.py file:
import sys
from PySide6.QtWidgets import QApplication
from opaque.view.application import BaseApplication
from opaque.models.configuration import DefaultApplicationConfiguration
from opaque.models.annotations import StringField
# 1. Define Configuration
class MyAppConfig(DefaultApplicationConfiguration):
app_name = StringField(default="MyApp")
app_title = StringField(default="My OPAQUE App")
# 2. Define Application
class MyApplication(BaseApplication):
def __init__(self):
super().__init__(MyAppConfig())
# Register features here (see documentation)
# 3. Run
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MyApplication()
if window.try_acquire_lock():
window.show()
sys.exit(app.exec())
2. Add a Feature (MVP)
Create a simple feature (e.g., MyFeature):
from opaque.models.model import BaseModel
from opaque.view.view import BaseView
from opaque.presenters.presenter import BasePresenter
from PySide6.QtWidgets import QLabel, QVBoxLayout
# Model
class MyModel(BaseModel):
def feature_name(self): return "My Feature"
def feature_icon(self): return None
# View
class MyView(BaseView):
def __init__(self, app, parent=None):
super().__init__(app, parent)
layout = QVBoxLayout()
layout.addWidget(QLabel("Hello OPAQUE!"))
self.setLayout(layout)
# Presenter
class MyPresenter(BasePresenter):
pass # Add logic here
# In MyApplication.__init__:
self.register_feature(MyPresenter(MyModel(self), MyView(self), self))
📚 Documentation
- Developer Guide: Detailed guide on bootstrapping, adding features, and using services like the Console.
- Build Guide: How to create standalone executables.
- API Reference: Class and method reference.
- Version Management: Handling application versions.
📂 Examples
Check the examples/ directory in the repository for complete working examples:
basic_example: Full showcase of MVP, Logging, Console, and Tabs.notification_example: Demonstrates the notification system.closeable_tab_example: Using the advanced Tab widget.
🤝 Contributing
Contributions are welcome! Please see the Issues page.
📄 License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opaque_framework-1.0.1.tar.gz.
File metadata
- Download URL: opaque_framework-1.0.1.tar.gz
- Upload date:
- Size: 86.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e3431ba900906963f91dbc8929351ba5d61887fbb70b2b505b82f63b850047
|
|
| MD5 |
3da26f33fe16f8f76e6ef07d6f110749
|
|
| BLAKE2b-256 |
f8e8237e88db2dcc9ff46546fb8a65f0cafd5e5362ca012b741fb152c70eb79f
|
File details
Details for the file opaque_framework-1.0.1-py3-none-any.whl.
File metadata
- Download URL: opaque_framework-1.0.1-py3-none-any.whl
- Upload date:
- Size: 94.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da047b9b436e2cf7de31ed80a1ee079462e5db7b51911f7f81842913892a5c59
|
|
| MD5 |
7a7d1149b737a2071474d8a70e9df9b4
|
|
| BLAKE2b-256 |
eb1bbda404eb7f63b782ff2ea8d92ac481aec0dfabe5be2cc75bb9ad76f504a5
|