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)
Windows & Linux GUI application to use a Satodime (satodime.io)

Satodime-Tool Licence: LGPL v3 Author: Toporin Language: Python (= 3.6) Homepage: https://github.com/Toporin/Satodime-Tool Introduction What is Satod

4 Dec 16, 2022
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

7 Feb 15, 2022
Basic calculator using Tkinter GUI

Basic calculator using Tkinter GUI

Rogerio Penchel 17 Jan 09, 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
Tkinter-ATM - Python GUI case made with Tkinter

tkinter-ATM Python GUI case made with Tkinter The task of this case was to creat

2 Jan 13, 2022
A simple GUI designer for the python tkinter module

Leer en Español Welcome to Pygubu! Pygubu is a RAD tool to enable quick and easy development of user interfaces for the Python's tkinter module. The u

Alejandro Autalán 1.7k Dec 27, 2022
Web-Broswer simple using PyQt5 tools

Web-Broswer Simple web broswer made using PyQt Completely simple and easy to use How to set it up git clone https://github.com/AsjadOooO/Web-Broswer.g

Asjad 3 Nov 13, 2021
LCD GUI for P4wnP1 ALOA

GUI for P4wnP1 Colorful UI interface for P4wnP1 ALOA Don't pwn just as a USB client. Use also the USB host capabilities! UPS Lite support Scalability

John 7 Dec 13, 2022
A small pomodoro GUI for Windows/Linux created in Python with PyQt5.

Pomodoro A small pomodoro GUI for Windows/Linux created with PyQt5. Features The "Timer" tab allows you to set your desired work and rest times aswell

Burak Martin 81 Dec 28, 2022
Remi is a GUI library for Python applications that gets rendered in web browsers

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.

Davide Rosa 3.2k Jan 07, 2023
AutoCalypsoBTS - A simple GUI CalypsoBTS for DragonOS by CrTh

AutoCalypsoBTS 📱 📞 A simple GUI CalypsoBTS for DragonOS by CrTh Download Drago

CrTx0 18 Dec 15, 2022
GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings

warp-cli-gui GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings. Description Python program that will int

Danie 6 Nov 01, 2022
Tukaan is the new framework that aims to replace Tkinter

Tukaan is the new, pythonic and colorful (like a keel-billed toucan) framework that aims to replace Tkinter. It has everything (on my computer, not at GitHub) that you need to develop cross-platform

Tukaan 101 Jan 08, 2023
This is the new and improved Plex Automatic Pre-roll script with a GUI

Plex-Automatic-Pre-roll-GUI This is the new and improved Plex Automatic Pre-roll script with a GUI! It should be stable but if you find a bug please l

164 Nov 04, 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
Randomly picks between your favourite meals for you when you're feeling indecisive.

Food Recommendations Desktop application created with python and tkinter. The goal for this application is to provide a way for users to enter and sav

Jesse Kartabani 1 Dec 07, 2021
A html canvas based screencasting server with occasional ground-truth updates via screenshots and very fast input drawing

rm2canvas A html canvas based screencasting server for the reMarkable 1/2 digital paper systems. It draws live on the canvas from the remarkables touc

45 Sep 08, 2022
Write desktop and web apps in pure Python

Flexx Want to stay up-to-date about (changes to) Flexx? Subscribe to the NEWS issue. Introduction Flexx is a pure Python toolkit for creating graphica

flexxui 3.1k Dec 29, 2022
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 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