decoui
Turn annotated Python methods into native desktop tools people can actually use.
Decorator-driven GUI framework for Python · Built with PySide6
decoui turns function signatures into forms, executions into live logs, and every run into a traceable record. You keep writing Python business logic; decoui supplies the Qt window, background execution, history, replay, settings, and help system.
What decoui does for you
| From code to desktop tool | What decoui provides |
|---|---|
| ① Annotate | Describe existing Python methods with @toolset, @tool, and type annotations. |
| ② Collect | Discover toolsets automatically, or choose them explicitly with toolsets=[...]. |
| ③ Launch | Generate a searchable sidebar, tag filters, parallel tool tabs, and a shared settings entry point. |
| ④ Fill | Map Python types to native widgets, with autocomplete, cascading values, and lazy defaults when needed. |
| ⑤ Trace | Run work in the background, capture print and logging, persist parameters and logs, and replay previous inputs. |
| ⑥ Ship | Apply themes, i18n catalogues, and collected help content to turn an internal script into a usable desktop application. |
Help and localization, built in
Turn docstrings into user-facing help
Document the method once. decoui automatically collects docstrings into searchable, navigable help pages—complete with summaries, parameters, return values, exceptions, and cross-references.
Make every user feel at home
One interface, many languages. Select the interface language and provide application catalogues for your own labels, fields, descriptions, and help content—without rebuilding the UI.
More than a generated form
- Themes — Four built-in looks: Light, Cockpit, Mission Control, and Industrial 1980s. Extend or replace them with JSON, and switch themes without interrupting running tools.
- Internationalization (i18n) — decoui ships its own interface catalogues. Your tool labels, fields, descriptions, and help content can use separate application catalogues.
- Collected help — Build summaries, parameter tables, return values, and error documentation from docstrings. Add long-form Markdown and cross-reference other help pages.
- Reliable execution — Run tools on background threads with progress reporting, timeouts, cancellation, and streamed child-process output.
- History and replay — Persist every run in SQLite, filter the history, inspect full logs, and restore an earlier parameter snapshot.
Start in 30 seconds
pip install decoui
Requires Python 3.10 or later. decoui depends on the smaller PySide6-Essentials package by default, without pulling in the complete PySide6-Addons payload.
import logging
from decoui import gui_main, tool, toolset
@toolset(label="Text Tools", tags=["text"])
class TextTools:
@tool(
label="Count Characters",
description="Count characters, words, and lines.",
placeholders={"content": "Paste text here..."},
)
def count(self, content: str = "") -> None:
words = len(content.split())
logging.info("%d chars / %d words", len(content), words)
if __name__ == "__main__":
gui_main(title="My Tools")
Run the file. gui_main() discovers every @toolset in the caller's namespace and builds the complete application around it.
python app.py
Types become forms
| Python type | Generated control |
|---|---|
str |
Single-line text field |
int / float |
Numeric input |
bool |
Checkbox |
list / dict |
Multi-line editor |
Enum |
Dropdown |
pathlib.Path |
Path field with file and directory pickers |
Add completions, cascade, and defaults for autocomplete, dependent fields, and runtime defaults. The underlying methods remain ordinary Python and can still be called and tested without the GUI.
Documentation
The detailed material has moved out of this README so you can jump directly to the guide you need:
- Complete API and behavior reference — decorators, type mapping, form assistance, themes, storage, history, and more
- Startup lifecycle — initialization order, loading data, and failure handling
- Application translation — localizing tool text and long-form help
- Help authoring — docstrings, Markdown, and cross-references
- Cancellation and child processes — implementing Stop, timeouts, and cleanup correctly
- Design and implementation — module structure, execution engine, storage, and UI architecture
For a complete example covering every supported feature, explore src/decoui/example/ and run:
python -m decoui.example
Where it fits
Data processors, operations utilities, batch-job launchers, internal productivity tools, and Python scripts intended for non-developers—especially when the business logic already exists and only needs a reliable desktop entry point.
decoui is currently in Alpha. Please share real-world issues and feedback through GitHub Issues.
License
Metadata
Release files for decoui 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| decoui-1.0.0.tar.gz | 752.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| decoui-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / decoui-1.0.0.tar.gz
| Download URL | decoui-1.0.0.tar.gz |
|---|---|
| Size | 752.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7600378f3767e0eff91c1ef3cb0f7d1dda4b15c9ff5e1a65a704bbd64a433414
|
|
BLAKE2b-256 checksum How to use checksums |
1d08aa4f838716054eb7e1cde2c4e286d6de7d4ba4e8c08ecf7519c8a04b7d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / decoui-1.0.0-py3-none-any.whl
| Download URL | decoui-1.0.0-py3-none-any.whl |
|---|---|
| Size | 367.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b353fdf8b082b361ccef9eb518799f1f13af664d0c534c5b624ea73ee9adcc73
|
|
BLAKE2b-256 checksum How to use checksums |
43c186f0f70b10c39faed0f56047373b219ee3edf26c0da4bc433698da4d274c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|