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.2.2b0.tar.gz (4.7 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.2.2b0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastpwa-0.2.2b0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.0 CPython/3.13.7 Linux/6.11.0-1018-azure

File hashes

Hashes for fastpwa-0.2.2b0.tar.gz
Algorithm Hash digest
SHA256 d3a9b8b910959b3f58b901e2f46a90a32e0cac24946fe8e072f6bd558ee2931c
MD5 cdfc64dc6136c073d30e9d9f505681a4
BLAKE2b-256 cc8fbbee20ffe7b8679a6118aa4c1247999622dfc1b4911f25e0d2a0acdc7c46

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastpwa-0.2.2b0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.0 CPython/3.13.7 Linux/6.11.0-1018-azure

File hashes

Hashes for fastpwa-0.2.2b0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2a7f54bd435d38c62457c26925a8f920af720b33965cf760e60153d3211500c
MD5 c9785e3988efd849d6db8371f99a472d
BLAKE2b-256 fe32be7dffe79134e23c46c68deb6cfed8ebff8bf7767761e7f90e9040e3e41d

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