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 (Optional[AppCallable], default:
None) - Called afterPagewas created, but before callingmain. - proxy_path (Optional[str], default:
None) - URL prefix when the app is mounted under a proxy. - assets_dir (Optional[str], default:
None) - an absolute path to app's assets directory. - app_name (Optional[str], default:
None) - PWA application name. - app_short_name (Optional[str], default:
None) - PWA application short name. - app_description (Optional[str], 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 (Optional[str], default:
None) - an absolute path to a directory with uploaded files. - upload_endpoint_path (Optional[str], default:
None) - absolute URL of upload endpoint, e.g./upload. - max_upload_size (Optional[int], default:
None) - maximum size of a single upload, bytes. Unlimited ifNone. - secret_key (Optional[str], 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.