Overview
PyForms is a Python framework for developing GUI applications. It provides a layer of abstraction that allows you to write UI code once and run it on different backends (PyQt5, PySide2, and terminal). PyForms is designed to be simple and intuitive, ideal for both beginners and experienced programmers.
Key features
- Unified API over different backends
- Rapid application development
- Built-in widgets and tools
- Support for desktop and web applications
- Modular design for easy customization
Common use cases
- Building desktop data processing tools
- Creating educational applications
- Rapid prototyping of GUI interfaces
- Developing simple form-based applications
- Research and data visualization tools
Installation
pip install pyforms-gui
Example
from pyforms.basewidget import BaseWidget
from pyforms.controls import ControlText, ControlButton
class SimpleExample(BaseWidget):
def __init__(self):
super().__init__('Simple Example')
# Define form fields
self._name = ControlText('Name')
self._greet = ControlButton('Greet')
# Define action
self._greet.value = self._say_hello
def _say_hello(self):
print(f"Hello, {self._name.value}!")
if __name__ == '__main__':
from pyforms import start_app
start_app(SimpleExample)