Can we build a pyscript (client-side Python) web app that loads super quick and doesn't lag during startup? Could we create one that looks like a regular web app rather than just an embedded Jupyter notebook or data science experience?
The answer is YES! And you'll learn how to build exactly that in this video. No pyscript or pyodide experience necessary. Just lovely Python apps running locally in your macOS dock or Windows taskbar.
▬ Chapters ▬▬▬▬▬▬▬▬▬▬▬▬
0:00 Introduction
0:54 What is pyscript?
1:37 What we will build
2:47 Surveying the pyscript examples
4:00 How does it load over slow networks?
6:34 Source code for the weather PWA app
6:56 Running the app locally (dev mode)
8:21 HTML to integrate py-script
12:11 Running app's Python code in the browser
14:58 DOM manipulation and driving the UI with client-side Python
17:45 Hook JavaScript events with Python functions
19:44 Web site to offline progressive web app (PWA)
20:22 How can we install the PWA app locally?
21:52 Requirements of a PWA
23:57 Registering the serviceWorker
27:20 Seeing the PWA in browser dev tools
28:35 Final thoughts
▬ Code ▬▬▬▬▬▬▬▬▬▬▬▬
Get all the code for the app you saw in this video from the GitHub repo:
https://github.com/mikeckennedy/pyscript-pwa-example