magicgui 🧙

License Version conda-forge Python Version

Type-based GUI autogeneration for python.


# via pip
pip install magicgui

# via conda
conda install -c conda-forge magicgui

from types to widgets

The core feature of magicgui is the @magicgui decorator, which can autogenerate a graphical user interface (GUI) by inspecting a function signature and adding an appropriate GUI widget for each parameter type.

from magicgui import magicgui

def add(my_number: int, some_word: str = 'hello', maybe = True):

configuration and advanced usage

The @magicgui decorator takes a number of options that allow you to configure the GUI and it’s behavior. See configuration for more information.