Turn your Python code into GUI’s easily!

Manpreet Singh
3 min readSep 22, 2021

Welcome back! Python is an awesome programming language with a ton capability, so let’s talk about an awesome way to develop GUI’s with Python very easily. Now, I found this package by scrolling through GitHub, this specific package is called Gooey, check out their GitHub page below:

This specific package prides itself on converting almost any Python 2 or Python 3 console program into a GUI application with one line! Below is an example that they have on their GitHub page:

To install this package, we can use the following command:

pip install Gooey

At this point, we can use the following example to structure your GUI (this code was taken from their GitHub page, linked above):

from gooey import Gooey

@Gooey <--- all it takes! :)
def main():
parser = ArgumentParser(...)
# rest of code

You can also add more functionality to your GUI as well, check out the amount of functionality below (again, check out their GitHub page for all of the details):

# options
@Gooey(advanced=Boolean, # toggle whether to show advanced config or not
language=language_string, # Translations configurable via json
auto_start=True, # skip config screens all together
target=executable_cmd, # Explicitly set the subprocess executable arguments
program_name='name', # Defaults to script name
program_description, # Defaults to ArgParse Description
default_size=(610, 530), # starting size of the GUI
required_cols=1, # number of columns in the "Required" section
optional_cols=2, # number of columns in the "Optional" section
dump_build_config=False, # Dump the JSON Gooey uses to configure itself
load_build_config=None, # Loads a JSON Gooey-generated configuration
Manpreet Singh

Data Scientist / Engineer!