Publish Flet Web App
Flet enables publishing applications as either **static** or **dynamic** websites.
Static Website
**Description:** Content is static; Python code runs in the web browser using Pyodide.
**Loading Time:** Slower, as Python runtime (Pyodide), app code, and dependencies must load.
**Python Compatibility:** Limited; not all native Python packages are compatible with Pyodide.
**Responsiveness:** Zero latency for user-generated events and UI updates.
**Performance:** Slower (3x-5x) compared to native Python due to WASM.
**Code Protection:** Low; code is inspectable in the browser.
**Hosting:** Cheap/Free; can be hosted on static hosting platforms (GitHub Pages, Cloudflare Pages, etc.).Dynamic Website
**Description:** Content is dynamically generated; Python code runs on the server.
**Loading Time:** Faster, as only the app runs on the server.
**Python Compatibility:** Full; any Python package can be used.
**Responsiveness:** Non-zero latency due to WebSocket communication between browser and server.
**Performance:** Faster, as code runs on the server with native Python.
**Code Protection:** High; app code remains on the server.
**Hosting:** Paid; requires a server to run Python code and WebSocket communication.