Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastpwa-0.5.1b0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastpwa-0.5.1b0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file fastpwa-0.5.1b0.tar.gz.

File metadata

  • Download URL: fastpwa-0.5.1b0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.8 CPython/3.14.4 Linux/6.17.0-1010-azure

File hashes

Hashes for fastpwa-0.5.1b0.tar.gz
Algorithm Hash digest
SHA256 055409c1b7642fa08637a2c7c65ef91b3ef54d12bd6c5cbeb53cd136c973d3b4
MD5 c4f034f55c53f5ad94f46e86f0c1714a
BLAKE2b-256 2869b851e5bd871f21214acbb247b63b1f0f327b2da452c2a4296f71173932c3

See more details on using hashes here.

File details

Details for the file fastpwa-0.5.1b0-py3-none-any.whl.

File metadata

  • Download URL: fastpwa-0.5.1b0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.8 CPython/3.14.4 Linux/6.17.0-1010-azure

File hashes

Hashes for fastpwa-0.5.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 efa1a15c2c54931601aafd99975addb40d401a169e092cb9f5f8cb20f319907b
MD5 63ae854a149dc18510fbbc831ff7e6ab
BLAKE2b-256 aa6d7464eaa75120f3738f8ee06ccc4fe26f6c88bf615306c23c4043f7448357

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page