Skip to main content

React-quality reactive form generation framework for PyQt6

Project description

pyqt-reactor

React-quality reactive form generation framework for PyQt6

PyPI version Documentation Status Python 3.11+ License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt_reactive-0.1.21.tar.gz (525.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyqt_reactive-0.1.21-py3-none-any.whl (448.5 kB view details)

Uploaded Python 3

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

Hashes for pyqt_reactive-0.1.21.tar.gz
Algorithm Hash digest
SHA256 310a326dc73fd5e09ff5d604fe76e318ecc85ddad5c00e397ced80c89b51a56d
MD5 19bf7f0cf0b7583cf987d0201bcf581c
BLAKE2b-256 48cebf5300d66aa4b9aaad83f719b12e2b854b6bca1f12bd6e207db883bbf932

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqt_reactive-0.1.21.tar.gz:

Publisher: publish.yml on OpenHCSDev/PyQT-reactive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyqt_reactive-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 eb044f3036ec7d1333da76602588684cad9d5e40f127934f60419445d2112983
MD5 e06bde08b7231cb5f62f50daf0abecf0
BLAKE2b-256 602fa6fabc16d8fcaac45cbf889a9e3fd3544512274afadd77149eca12206051

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqt_reactive-0.1.21-py3-none-any.whl:

Publisher: publish.yml on OpenHCSDev/PyQT-reactive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page