File size: 1,028 Bytes
53ca1dd 8621d18 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
---
title: Pyscript
emoji: π
colorFrom: gray
colorTo: blue
sdk: docker
pinned: false
---
# pyscript PWA Example
This app shows how using a PWA (Progressive Web App) along with [pyscript](https://pyscript.net)
allows us to create Python-based web applications that install like regular applications and
(mostly) don't suffer from the large file downloads needed for Python's WebAssembly runtime.

To run the app, just start it as a Flask application (keep the app running for the web weather API).
```bash
python3 -m venv venv
. /venv/bin/activate
pip install -r requirements.txt
flask run
```
Then open 127.0.0.1:5000 and choose "install PWA". See
[these steps for Chrome](https://www.howtogeek.com/fyi/how-to-install-progressive-web-apps-pwas-in-chrome/),
google the actions if you are new to this in your browser.
Unfortunately, Mozilla gave up on this feature for Firefox browser.
If you have improvements for the PWA side of things, please open a PR. It's very bare-bones.
|