--- id: magicgui version: "0.10.2" license: MIT license_treatment: permissive maintenance: active --- # magicgui — build GUIs from python types License: permissive · Maintenance: active · Downloads: 241.1K/mo ## 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 above — verify before relying. Magicgui builds graphical user interfaces directly from Python function signatures and type annotations, with minimal boilerplate code. 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 pip install magicgui uv add magicgui poetry add magicgui ## Installing magicgui 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. 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() PyQt5 or PySide2 must be installed separately; magicgui provides only the Qt abstraction layer via qtpy. 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_current - Install friction: low - Maintenance: active - Downloads: 241.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gui from type annotations, automatic gui generation, python function to gui, qt gui decorator, type-driven ui builder, python gui without layout code, widget generation from types, gui-generation, type-annotations, qt-wrapper [View on SkillFed](https://skillfed.io/packages/magicgui) · [View on PyPI](https://pypi.org/project/magicgui/)