Python Desktop App
Learn how to make a desktop GUI application using Python, JavaScript, HTML, & CSS all thanks to pywebview.
pywebview is essentially a mini web-browser that you can control. It makes it really easy to write any python code to integrate directly to JavaScript. Building an app for pywebview is much like building a web application but a few key differences:
- Database optional
- Access to local users' file system
- Virtually no latency (between JavaScript and Python)
- Offline by default (no need to use the internet).
The advantage of using pywebview is that:
- Frontends can leverage web technology frontends like React, Vue, Angular, Bootstrap, Preact, and much more
- Incredibly small build size (roughly 20MB for a full application)
- Simple and powerful API
- Cross Platform (macOS, Windows, Linux)
Recommended skills
- Python basics
- JavaScript basics
- React/Vue/Angular experience is a plus
Reference code
Lessons
1
Welcome
0:00
2
Walkthrough
0:00
3
Requirements
0:00
4
Setup the Virtual Environment
0:54
5
Hello World
2:56
6
Python API Class
3:21
7
Using HTML Documents
1:37
8
JavaScript Event Listener for PyWebview
4:52
9
Sending Data from JavaScript
3:10
10
Evaluate JavaScript from Python
4:28
11
Adding CSS
4:05
12
Using Jinja2 for HTML Templates
8:55
13
HTML Form Inputs
18:05
14
Using File Inputs
0:00
15
Create File Dialog
0:00
16
Prepare for Flask Serving
0:00
17
Display Images from local computer
0:00
18
Folder of Images to Thumbnails
0:00
19
Distribute via PyInstaller
0:00
20
Thank you & next steps
0:00