React-quality reactive form generation framework for PyQt6
Project description
pyqt-reactor
React-quality reactive form generation framework for PyQt6
Features
- Dataclass-Driven Forms: Automatically generate UI forms from Python dataclasses
- ObjectState Integration: First-class support for lazy configuration and hierarchical inheritance
- ABC-Based Protocols: Type-safe widget contracts with clean interfaces
- Reactive Updates: React-style lifecycle hooks with cross-window synchronization
- Theming System: ColorScheme-based styling with dynamic theme switching
- Flash Animations: Game-engine inspired visual feedback for value changes
- Window Management: Scoped window registry with navigation support
Quick Start
from dataclasses import dataclass
from PyQt6.QtWidgets import QApplication
from pyqt_reactive.forms import ParameterFormManager
@dataclass
class ProcessingConfig:
input_path: str = ""
output_path: str = ""
num_workers: int = 4
enable_gpu: bool = False
app = QApplication([])
form = ParameterFormManager(ProcessingConfig)
form.show()
app.exec()
Installation
pip install pyqt-reactor
For development:
git clone https://github.com/trissim/pyqt-reactor.git
cd pyqt-reactor
pip install -e ".[dev]"
Architecture
The package is organized in layers:
pyqt_reactive/
├── core/ # Tier 1: Pure PyQt6 utilities
├── protocols/ # Tier 2: Widget ABCs and adapters
├── services/ # Tier 3: Reusable service layer
├── forms/ # Tier 4: ParameterFormManager
├── theming/ # Color schemes and styling
├── widgets/ # Extended widget implementations
└── animation/ # Flash effects and visual feedback
Key Components
ParameterFormManager
Auto-generates forms from dataclasses with full type support:
from pyqt_reactive.forms import ParameterFormManager
form = ParameterFormManager(MyConfig)
config = form.collect_values() # Get typed config back
WindowManager
Singleton window registry with scope-based navigation:
from pyqt_reactive.services import WindowManager
window = WindowManager.show_or_focus("config:plate1", lambda: ConfigWindow(...))
WindowManager.navigate_to("config:plate1", field="exposure_time")
Theming
Dynamic theme switching with consistent styling:
from pyqt_reactive.theming import ColorScheme, apply_theme
apply_theme(widget, ColorScheme.DARK)
Documentation
Full documentation available at pyqt-reactor.readthedocs.io
License
MIT License - see LICENSE file for details
Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Credits
Developed by Tristan Simas. Extracted from OpenHCS for general-purpose use.
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 pyqt_reactive-0.1.21.tar.gz.
File metadata
- Download URL: pyqt_reactive-0.1.21.tar.gz
- Upload date:
- Size: 525.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
310a326dc73fd5e09ff5d604fe76e318ecc85ddad5c00e397ced80c89b51a56d
|
|
| MD5 |
19bf7f0cf0b7583cf987d0201bcf581c
|
|
| BLAKE2b-256 |
48cebf5300d66aa4b9aaad83f719b12e2b854b6bca1f12bd6e207db883bbf932
|
Provenance
The following attestation bundles were made for pyqt_reactive-0.1.21.tar.gz:
Publisher:
publish.yml on OpenHCSDev/PyQT-reactive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqt_reactive-0.1.21.tar.gz -
Subject digest:
310a326dc73fd5e09ff5d604fe76e318ecc85ddad5c00e397ced80c89b51a56d - Sigstore transparency entry: 941386043
- Sigstore integration time:
-
Permalink:
OpenHCSDev/PyQT-reactive@0ca2e8335b86cb79c6b8c9a9b394e4d4eae38c77 -
Branch / Tag:
refs/tags/v0.1.21 - Owner: https://github.com/OpenHCSDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ca2e8335b86cb79c6b8c9a9b394e4d4eae38c77 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyqt_reactive-0.1.21-py3-none-any.whl.
File metadata
- Download URL: pyqt_reactive-0.1.21-py3-none-any.whl
- Upload date:
- Size: 448.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb044f3036ec7d1333da76602588684cad9d5e40f127934f60419445d2112983
|
|
| MD5 |
e06bde08b7231cb5f62f50daf0abecf0
|
|
| BLAKE2b-256 |
602fa6fabc16d8fcaac45cbf889a9e3fd3544512274afadd77149eca12206051
|
Provenance
The following attestation bundles were made for pyqt_reactive-0.1.21-py3-none-any.whl:
Publisher:
publish.yml on OpenHCSDev/PyQT-reactive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqt_reactive-0.1.21-py3-none-any.whl -
Subject digest:
eb044f3036ec7d1333da76602588684cad9d5e40f127934f60419445d2112983 - Sigstore transparency entry: 941386065
- Sigstore integration time:
-
Permalink:
OpenHCSDev/PyQT-reactive@0ca2e8335b86cb79c6b8c9a9b394e4d4eae38c77 -
Branch / Tag:
refs/tags/v0.1.21 - Owner: https://github.com/OpenHCSDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ca2e8335b86cb79c6b8c9a9b394e4d4eae38c77 -
Trigger Event:
push
-
Statement type: