magicgui
build GUIs from python types
Decision gist · record as of 2026-08-14
Yes, if you need to build simple to moderate GUIs quickly and already have PyQt5 or PySide2 available. The decorator-based approach eliminates layout boilerplate for type-driven interfaces. Not suitable if you need complex custom layouts, advanced styling, or have no Qt backend installed. Active maintenance and no known vulnerabilities support adoption.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- PyQt5 or PySide2 must be installed separately; magicgui provides only the Qt abstraction layer via qtpy.
- Low install friction; pure Python wheel with five runtime dependencies.
- Actively maintained as of 2026-08-03 with recent releases.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.
last release 2026-04-10 (126 days) · last repo commit 2026-08-03 · 511 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 241,059 downloads/mo, #8,889 on PyPI
Alternatives
Verify before relying
pip install magicgui[pyqt5]
from magicgui import magicgui
@magicgui(call_button="calculate")
def my_function(x: float = 1.0, y: int = 2) -> float:
return x * y
my_function.show()- Whether the package works equally well with both PyQt5 and PySide2 backends or if one is preferred
- Performance characteristics when building complex multi-widget interfaces
- Extent of customization possible beyond the decorator's built-in options
What it is and what it does
Magicgui is a Python library that generates graphical user interfaces from function signatures and type annotations. Instead of writing widget layout code, you decorate a Python function with @magicgui and the library automatically creates form controls for each parameter based on its type. It uses qtpy to support both PyQt5 and PySide2 backends, meaning you choose which Qt implementation to install.
The library handles common types (int, float, str, bool, Enum) and generates appropriate widgets automatically. You can customize behavior with decorator arguments like call_button and result_widget. The generated GUI is interactive—users fill in parameters and click a button to execute the function, with results displayed in the interface. It's designed for scientists, researchers, and developers who want to quickly prototype interactive tools without learning Qt or GUI layout frameworks.
Use it for
- Rapidly prototype scientific calculators or data analysis tools with minimal GUI code
- Build parameter-tuning interfaces for algorithms where inputs map directly to function arguments
- Create interactive demos of Python functions for presentations or educational materials
- Generate admin or configuration UIs from existing function signatures without rewriting logic
- Develop desktop tools for non-programmers by exposing Python functions as clickable forms
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to build simple to moderate GUIs quickly and already have PyQt5 or PySide2 available.
The decorator-based approach eliminates layout boilerplate for type-driven interfaces. Not suitable if you need complex custom layouts, advanced styling, or have no Qt backend installed. Active maintenance and no known vulnerabilities support adoption.
Install
magicgui on PyPI
Before you install
Low install friction; pure Python wheel with five runtime dependencies. Actively maintained as of 2026-08-03 with recent releases. Requires either PyQt5 or PySide2 as a backend, which must be installed separately via extras or manually.
PyQt5 or PySide2 must be installed separately; magicgui provides only the Qt abstraction layer via qtpy.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.
Quickstart
pip install magicgui[pyqt5]
from magicgui import magicgui
@magicgui(call_button="calculate")
def my_function(x: float = 1.0, y: int = 2) -> float:
return x * y
my_function.show()
Verify before relying
- Whether the package works equally well with both PyQt5 and PySide2 backends or if one is preferred
- Performance characteristics when building complex multi-widget interfaces
- Extent of customization possible beyond the decorator's built-in options
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesdocstring-parserpsygnalqtpysuperqttyping-extensions |
| Maintenance | Actively maintained 126 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 241,059 / month, #8,889 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: X11 Applications :: QtIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Desktop EnvironmentTopic :: Software DevelopmentTopic :: Software Development :: User InterfacesTopic :: Software Development :: Widget SetsTopic :: UtilitiesTyping :: Typed |
Evidence: magicgui-0.10.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gui from type annotations”
- magicguiMagicgui builds graphical user interfaces directly from Python…
- pyiotoolsProvides unified I/O handling for command-line, GUI, and programmatic…
- customtkinterCustomTkinter wraps Python's Tkinter to provide modern, customizable…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also superqt · PySide2 · pyqtgraph · PyQt5 · QtPy · customtkinter · PySide6 · PyQt5-Qt5 · PySide6-Essentials · phoebusgen