Skip to main content

Auto-generate PyQt6 GUIs from class parameters for quick tools and prototyping.

Project description

Welcome to GlitchForge!

GlitchForge is a lightweight Python library for building simple, responsive GUI applications in minutes. It is designed for rapid system development, testing, and prototyping, enabling you to easily expose parameters to the user and launch functions dynamically.


Features

  • 🔹 Automatically generate UI from class attributes
  • 🔹 Supports basic types: int, float, str, bool
  • 🔹 Launch any custom function via a button
  • 🔹 System tray integration with Quick Actions
  • 🔹 Built with PyQt6 for modern UI experience

Installation

pip install glitchforge

Quick Start

Here's how easy it is to create a GUI with GlitchForge:

from glitch_forge.glitcher import Glitcher
from glitch_forge.parameter import Param

class MyApp(Glitcher):
    param_a: Param = Param(10, int, "Parameter A")
    param_b: Param = Param(3.14, float, "Parameter B")
    param_c: Param = Param("Hello", str, "Parameter C")
    param_d: Param = Param(True, bool, "Parameter D")

    def __init__(self):
        super().__init__(
            launch_func=self.run,
            launch_button_label="Run",
            window_title="My Example App"
        )
        self.show_window()

    def run(self, base_class):
        print(base_class.param_a.val)
        print(base_class.param_b.val)
        print(base_class.param_c.val)
        print(base_class.param_d.val)

if __name__ == "__main__":
    import sys
    app = MyApp()
    sys.exit(app.app.exec())

Documentation

Core Classes

  • Glitcher

    • Handles main window setup and system tray icon.
    • Parameters:
      • launch_func : Function called when the launch button is pressed.
      • window_title : Title of the window.
      • window_icon : Icon of the window and tray.
      • launch_button_label : Label for the launch button.
  • Param

    • Represents a user-editable field.
    • Fields:
      • val : Default value.
      • var_type : Type of parameter (int, float, str, bool).
      • label : Label shown next to the input.
      • min_val, max_val : For numeric parameters.
      • tooltip, placeholder : Optional UI hints.
  • GuiWindow

    • Internal class for constructing the UI.

Supported Types

Type Widget
int SpinBox
float DoubleSpinBox
str LineEdit
bool CheckBox

System Tray

  • Tray icon supports:
    • "Show" : Focus application main window.
    • "Quit" : Exit the application.

Project Structure

glitch_forge/
├── __init__.py
├── _version.py
├── glitcher.py
├── parameter.py
├── ui.py
├── icon.svg
├── example.py

Requirements

  • Python 3.10+
  • PyQt6

License

MIT License

Free to use, modify, and distribute.


Screenshots

image


Future Plans

  • list[str], list[float] an list[int] type inputs
  • Ability to perform launch function via tray icon

Version

Current Version: 1.0.2

(See _version.py for details)

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

glitch_forge-1.0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

glitch_forge-1.0.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file glitch_forge-1.0.2.tar.gz.

File metadata

  • Download URL: glitch_forge-1.0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for glitch_forge-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5624445d7bad3f314a01f008fd16f3c6405df1b3e64904ffd7b9a8139e83cdcd
MD5 98f81515255c9542304bb009f38b1f7a
BLAKE2b-256 9939926e777774ff9014f81c9ea16815860a0c686465f59a39dfbe9cac180c9e

See more details on using hashes here.

File details

Details for the file glitch_forge-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: glitch_forge-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for glitch_forge-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 380fd1b4c247b5372e89b6e1b10ee675fb72bdd34c6f9d521c000f06ac07ee8e
MD5 c0da1982b63116418b94dd61d0432e13
BLAKE2b-256 ee6e3071656b8d20174943b6c9322d26c8b44cfd25083e414705a83956b71449

See more details on using hashes here.

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