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.1.1b0.tar.gz (4.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.1.1b0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fastpwa-0.1.1b0.tar.gz
Algorithm Hash digest
SHA256 04517e145b2a286179aae18a1d81f3cbf3dc61ab74562896797d714352907ac6
MD5 671c88304f37185dfb30223a806ef737
BLAKE2b-256 12b78451f1c890339e5a461572b91be22f6c96e46c92d798b36f2ca7194a00fd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fastpwa-0.1.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 4496f13a9385eba7935cebe52c6c023e0a6038241c8fce3c7b9d6827dc682341
MD5 cdd609317062bc77009c9101200e8a32
BLAKE2b-256 a144f96da6f5138b40cfed09adbc60c98ed142f1f5b47508193c92c93690c6f7

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