Skip to main content

FletStaticFiles

Serve Flet app static files.

Parameters:

  • 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) - Type of web renderer.
  • route_url_strategy (RouteUrlStrategy, default: RouteUrlStrategy.PATH) - Routing URL strategy.
  • no_cdn (bool, default: False) - Whether not load CanvasKit, Pyodide, and fonts from CDN.
  • websocket_endpoint_path (Optional[str], default: None) - Absolute URL of Flet app WebSocket handler. Defaults to /ws.

Inherits: fastapi.staticfiles.StaticFiles

Properties

Methods

  • lookup_path - Returns the index file when no match is found.

Properties

font_manifest_jsoninstance-attribute

indexinstance-attribute

manifest_jsoninstance-attribute

Methods

lookup_path

lookup_path(path: str)

Returns the index file when no match is found.

Parameters:

  • path (str) - Resource path.

Returns:

  • tuple[str, Optional[os.stat_result]] - [tuple[str, os.stat_result]]: Always returns a full path and stat result.