app
Mount all Flet FastAPI handlers in one call.
Parameters:
- main (AppCallable) - Application entry point. It is called for newly connected users. Handler (function or coroutine) must have 1 parameter of instance
Page. - before_main (AppCallable | None, default:
None) - Called afterPagewas created, but before callingmain. - proxy_path (str | None, default:
None) - URL prefix when the app is mounted under a proxy. - assets_dir (str | None, default:
None) - an absolute path to app's assets directory. - app_name (str | None, default:
None) - PWA application name. - app_short_name (str | None, default:
None) - PWA application short name. - app_description (str | None, default:
None) - PWA application description. - web_renderer (WebRenderer, default:
WebRenderer.AUTO) - web renderer defaulting toWebRenderer.AUTO. - route_url_strategy (RouteUrlStrategy, default:
RouteUrlStrategy.PATH) - routing URL strategy:path(default) orhash. - no_cdn (bool, default:
False) - do not load resources from CDN. - upload_dir (str | None, default:
None) - an absolute path to a directory with uploaded files. - upload_endpoint_path (str | None, default:
None) - absolute URL of upload endpoint, e.g./upload. - max_upload_size (int | None, default:
None) - maximum size of a single upload, bytes. Unlimited ifNone. - secret_key (str | None, default:
None) - secret key to sign and verify upload requests. - session_timeout_seconds (int, default:
DEFAULT_FLET_SESSION_TIMEOUT) - session lifetime, in seconds, after the user disconnected. - oauth_state_timeout_seconds (int, default:
DEFAULT_FLET_OAUTH_STATE_TIMEOUT) - OAuth state lifetime, in seconds, which is the maximum allowed time between starting OAuth flow and redirecting to OAuth callback URL.