Python GUIs Examples
This repository contains 100s of GUI examples written in Python. From complete working applications to reusable widgets snippets, these examples can
be freely re-used, re-mixed and tweaked to build your own Python GUI applications.
Contributions Welcome
This repo is an open collaborative collection of UI demonstrations, tutorials and examples for Python. New additions are welcome, just fork this repository, add your example code file(s) in the [library]/[type]/[folder-name] and open a pull request.
Browse this repo
Examples are available for
PyQt6 and
PySide6,
(many examples) along with
DearPyGui,
Flet,
Kivy,
NiceGUI,
PyQt5
PySide2
Streamlit and
Tkinter
Not sure which library to use? See our Which Python GUI? guide.
Many of these examples have more detailed write-ups on the Python GUIs website. See the source code for example to get links to the specific tutorials.
If you're new to creating GUI apps check out the introductory PyQt6 tutorial or PySide6 tutorial.
Demo Showcase
Some particularly neat examples of UIs build using Python are linked below. The full source code for these examples is available in this repo. In some cases there are also step by step examples of the app being built.
- Web Browser (untabbed) - "MooseAche" PyQt6 PySide6
- Web Browser (tabbed) - "Mozzarella Ashbadger" PyQt6 PySide6
- Minesweeper - "Moonsweeper" PyQt6 PySide6
- Notepad - "No2Pads" PyQt6 PySide6
- Calculator - "Calculon" (QtDesigner) PyQt6 PySide6
- Word Processor - "Megasolid Idiom" PyQt6 PySide6
- Webcam/Snapshot - "NSAViewer" PyQt6 PySide6
- Media Player - "Failamp" PyQt6 PySide6
- Post-it Notes - "Brown Note" (QtDesigner) PyQt6 PySide6
- Paint - "Piecasso" (QtDesigner) PyQt6 PySide6
- Unzip - "7Pez" (QtDesigner) PyQt6 PySide6
- Translator - "Translataarrr" (QtDesigner) PyQt6 PySide6
- Weather - "Raindar" (QtDesigner) PyQt6 PySide6
- Currency converter - "Doughnut" (PyQtGraph) PyQt6 PySide6
- Solitaire - "Ronery" (QGraphicsScene) PyQt6 PySide6
This is just a selection of the demos in this repo, pick a library and look under the demos/ folder.
Tutorials
Alongside the demos we also have step by step tutorial code, taken from our main site at pythonguis.com. These guide you through building GUIs with PyQt, PySide and other libraries. For example example there is a link back to the tutorial (and vice versa).
Getting started
To use each app you first need to install the requirements. In most cases
the only requirements are the GUI library and occasionally requests. To install
example specific requirements change to the folder of the example and run:
pip3 install -r requirements.txtOnce the requirements are installed, you can run the app. Every example in this repo comes with a main Python file called main.py to keep things simple.
python3 main.pyThe application window should appear.
Want to build your own apps?
If you think these apps are neat and want to learn more about
take a look at my PyQt6 tutorial
which covers everything you need to know to start building your own applications with Python.
You can also find more write-ups and tips on the same site.
Books & Courses
This repository and the Python GUIs website are both projects of Martin Fitzpatrick -- hello! I've written a number of popular books & courses on Python GUI programming, which you can find here https://www.pythonguis.com/books
Need help with your Python GUI project? I'm available to hire
Licenses
All code is licensed under an MIT license. This allows you to re-use the code freely, remixed in both commercial and non-commercial projects. The only requirement is to include the same license when distributing.
Icons used in the applications are by Yusuke Kamiyaman.