Make your FastAPI app installable on mobile devices.
Project description
🚀 FastPWA
FastPWA is a minimal FastAPI extension that makes your app installable as a Progressive Web App (PWA). It handles manifest generation, service worker registration, and automatic asset injection—giving you a native-like install prompt with almost no setup.
🌟 What It Does
- 🧾 Generates a compliant webmanifest from your app metadata
- ⚙️ Registers a basic service worker for installability
- 🖼️ Discovers and injects favicon and static assets (index.css, index.js, etc.)
- 🧩 Mounts static folders and serves your HTML entrypoint
📦 Installation
pip install fastpwa
🧪 Quickstart
from fastpwa import PWA
app = PWA(title="My App", summary="Installable FastAPI app", prefix="app")
app.static_mount("static") # Mounts static assets and discovers favicon
app.register_pwa(html="static/index.html") # Registers manifest, SW, and index route
📁 Static Folder Layout
FastPWA auto-discovers and injects these assets if present:
static/
├── index.html
├── index.css
├── index.js
├── global.css
├── global.js
└── favicon.png
🧬 Manifest Customization
You can override manifest fields via register_pwa():
app.register_pwa(
html="static/index.html",
app_name="MyApp",
app_description="A simple installable app",
color="#3367D6",
background_color="#FFFFFF"
)
📜 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastpwa-0.4.0b0.tar.gz.
File metadata
- Download URL: fastpwa-0.4.0b0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.6 CPython/3.14.3 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59475cc393c0db466b95430bf7d20b07d7bb8555b3b10c079162af835f46293a
|
|
| MD5 |
b842f2c75d87996b90157acdce1e530c
|
|
| BLAKE2b-256 |
d1507ae4ba511664b1e6d864e044587c97c6ea0a5b66f2c64e416131488aef68
|
File details
Details for the file fastpwa-0.4.0b0-py3-none-any.whl.
File metadata
- Download URL: fastpwa-0.4.0b0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.6 CPython/3.14.3 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c99685a92389a67fb8fec57b2f580f6ea04f94f91b6b550c26401bcda8d16571
|
|
| MD5 |
84ae8158ffbd212a0bdfa67cc9320a2a
|
|
| BLAKE2b-256 |
4ddd1fbd5304792a52f880b05b82cece6775ab2ccfe64452ebe21581b1f70e3d
|