build GUIs from python functions, using magic.

Overview

icon

License Version conda-forge Python Version Build Status codecov

magicgui: build GUIs from functions, using magic.

📖 Docs

Installation

magicgui uses qtpy to support both pyside2 and pyqt5 backends. However, you must have one of those installed for magicgui to work.

install with pip

pip install magicgui[pyqt5]
# or
pip install magicgui[pyside2]

or with conda:

conda install -c conda-forge magicgui pyqt  # or pyside2 instead of pyqt

ℹ️ If you'd like to help us extend support to a different backend, please open an issue.

Basic usage

from magicgui import magicgui
from enum import Enum

class Medium(Enum):
    Glass = 1.520
    Oil = 1.515
    Water = 1.333
    Air = 1.0003

# decorate your function with the @magicgui decorator
@magicgui(call_button="calculate", result_widget=True)
def snells_law(aoi=30.0, n1=Medium.Glass, n2=Medium.Water, degrees=True):
    import math

    aoi = math.radians(aoi) if degrees else aoi
    try:
        result = math.asin(n1.value * math.sin(aoi) / n2.value)
        return math.degrees(result) if degrees else result
    except ValueError:
        return "Total internal reflection!"

# your function is now capable of showing a GUI
snells_law.show(run=True)

snells

But that's just the beginning! Please see Documentation for many more details and usage examples.

Contributing

Contributions are welcome!

Please note: magicgui attempts to adhere to strict coding rules and employs the following static analysis tools to prevent errors from being introduced into the codebase:

To prevent continuous integration failures when contributing, please consider installing pre-commit in your environment to run all of these checks prior to checking in new code.

pre-commit install
You might also like...
Python Screen Recorder using Python

PY-Screen-Recorder Python Screen Recorder using Python Requirement: pip install cv2 pip install pyautogui pip install numpy How to reach me? You can r

Launched in 2018 Actively developed and supported. Supports tkinter, Qt, WxPython, Remi (in browser). Create custom layout GUI's simply.  Python 2.7 & 3 Support. 200+ Demo programs & Cookbook for rapid start. Extensive documentation.  Examples using Machine Learning(GUI, OpenCV Integration,  Chatterbot), Floating Desktop Widgets, Matplotlib + Pyplot integration, add GUI to command line scripts, PDF & Image Viewer. For both beginning and advanced programmers . Rich.tui is a TUI (Text User Interface) framework for Python using Rich as a renderer.
Rich.tui is a TUI (Text User Interface) framework for Python using Rich as a renderer.

rich.tui Rich.tui is a TUI (Text User Interface) framework for Python using Rich as a renderer. The end goal is to be able to rapidly create rich term

Basic Alarm Clock using Python.
Basic Alarm Clock using Python.

Basic Alarm Clock using Python.

A simple alarm-clock created using Python and Kivy.
A simple alarm-clock created using Python and Kivy.

Alarm-Clock made with Python and Kivy. A simple alarm-clock created using Python and Kivy. See the time. Set a maximum of 5 alarms. Cancel alarms. Not

An offline python frontend for the QuadVisions Colab Notebook using tkinter.
An offline python frontend for the QuadVisions Colab Notebook using tkinter.

Visions GUI An offline python frontend for the QuadVisions Colab Notebook using tkinter. It offers basic options and interactively displays the genera

Create shortcuts on Windows to your Python, EXE, Batch files or any other file using a GUI made with PySimpleGUI
Create shortcuts on Windows to your Python, EXE, Batch files or any other file using a GUI made with PySimpleGUI

shor Windows Shortcut Creation Create Windows Shortcuts to your python programs and any other file easily using this application created using PySimpl

Signin/Signup GUI form using tkinter in python
Signin/Signup GUI form using tkinter in python

SignIn-SignUpFormRepo Hello there, I am Shahid and this is the Signin/Signup GUI form using tkinter in python if you want to use avatar images then pa

This repository contains some projects that I have done using Python + Tkinter.

This repository contains some projects that I have done using Python + Tkinter.

Releases(v0.6.0)
A desktop application for JupyterLab, based on Electron.

A desktop application for JupyterLab, based on Electron.

JupyterLab 2.1k Jan 02, 2023
Currency calculator with PyQt5

currency-calculator currency calculator with PyQt5

Vusal Akhundzada 2 Mar 08, 2022
Dress up your code with a beautiful graphical user interface !

Dresscode Dress up your code with a beautiful graphical user interface ! This project is part of the Pyrustic Ecosystem. Look powered by the cyberpunk

20 Aug 24, 2022
Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development.

DelphiFMX4Python Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development. About: The delphifmx library

Embarcadero Technologies 191 Jan 09, 2023
python+PySimpleGUI+pyserial+threading

GUI_pyserial python+PySimpleGUI+pyserial+threading 功能 1.利用PySimpleGUI制作图形用户界面 2.利用threading实现多线程调用pyserial处理串口通信 模块版本 PySimpleGUI 4.46.0 pyserial 3.5

2 Dec 27, 2022
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

283 Nov 30, 2022
A GUI calculator made with tkinter module in python

GUI-Calculator A GUI calculator made with tkinter module in python How to setup the calculator If pygame is not installed, go to terminal and do pip i

Eric Jing 0 Aug 25, 2021
pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.

pyglet pyglet is a cross-platform windowing and multimedia library for Python, intended for developing games and other visually rich applications. It

1.3k Jan 01, 2023
A graphical user interface calendar with python

GUI-Calendar A graphical user interface calendar with python In this project I used tkinter module If you dont have tkinter module you can install it

Arone Sadegh 1 Dec 18, 2021
Awesome examples for my Sun Valley ttk theme!

Sun Valley ttk theme examples This is the examples repo for my stunning Sun Valley ttk theme! Be sure to start and atch this repo, because I will uplo

rdbende 117 Jan 03, 2023
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

Bimba Shrestha 283 Nov 30, 2022
Example GUI for Command line capable machine learning programs

Example GUI for Command line capable machine learning programs This is an example GUI made in PysimpleGUI and Tkinter, mainly for machine learning pro

Kim Yongwook 4 May 31, 2022
All you need to learn Tkinter!

Tkinter This repository contains the codes and resources which I used to learn the standard GUI library of Python, Tkinter! Best Tkinter Resources Vid

Samyak Jain 3 May 02, 2022
System Tray Icon for PySimpleGUI (the tkinter version). Adds a system tray icon by using pystray and PIL

psgtray Add a System Tray Icon to your tkinter port of PySimpleGUI. Installation via pip Installation is via pip: python -m pip install psgtray or if

PySimpleGUI 38 Dec 30, 2022
A Url Shortener with GUI made in Python.

Url-Shortener-with-GUI-in-python A Url Shortener with GUI made in Python. To Run this download the zip file and run the main file or Clone this repo.

SidTheMiner 1 Nov 12, 2021
A Python Tkinter based Inventory managment System

Inventory Management System Using Python Tkinter Introduction Inventory managemrnt system is an open source platform for manage business. It has a com

Amit Kumar Datta 2 Oct 14, 2021
EZ Presence - A GUI-Python app which makes it easy to set a custom Discord Rich Presence. (BETA)

EZ Presence EZ Presence is a GUI-Python app which makes it easy to set any custom Discord Rich Presence. Using the App How to Run Since the app is in

notsniped 2 Mar 01, 2022
A Virtual Desktop Assistant Written in Python

DesktopAssitant A Virtual Desktop Assistant Written in Python. It's generally a basic virtual assistant The basic purpose of this is to make work easi

Technerd Brainiac 597 Dec 31, 2022
The quick and easy way to add versatile graphical interfaces with networking capabilities to your Python programs.

The quick and easy way to add versatile graphical interfaces with networking capabilities to your Python programs. Give instant access to your application to whoever you want on the Internet, without

Claude SIMON 215 Dec 28, 2022
A GUI frontend developed in Python3 for simple admin tasks on MySQL-Server running on the localhost

A GUI frontend developed in Python3 for simple admin tasks on MySQL-Server running on the localhost. Developed for my CS School Project.

1 May 29, 2022