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.16.tar.gz (519.3 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.16-py3-none-any.whl (447.0 kB view details)

Uploaded Python 3

File details

Details for the file pyqt_reactive-0.1.16.tar.gz.

File metadata

  • Download URL: pyqt_reactive-0.1.16.tar.gz
  • Upload date:
  • Size: 519.3 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.16.tar.gz
Algorithm Hash digest
SHA256 52194de43b24feae01aaeddd17aa23815d6bc61ef232076ae5c26d48bed2c65b
MD5 e648a5c4b5ec4f3c08cec1012450e834
BLAKE2b-256 457c47d83cd4d5b1a8a2d8391eeee2eb79945ccac8b0f72c7c79fb0cfb6ceffc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqt_reactive-0.1.16.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.16-py3-none-any.whl.

File metadata

  • Download URL: pyqt_reactive-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 447.0 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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 924ab8b9f58d9ce5e77d7620e6bd0ad1b3b5f8d055e55e5ea7e2aea9a622066c
MD5 65278c09920fc6eef7151de8d06b8434
BLAKE2b-256 740d255771fe791ec1eef322e0f808b0d966fbb107350b117ccfe9ffe9633675

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqt_reactive-0.1.16-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