bundle.website.core.downloader ============================== .. py:module:: bundle.website.core.downloader .. autoapi-nested-parse:: Downloader adapter that emits progress updates over websocket. Classes ------- .. autoapisummary:: bundle.website.core.downloader.DownloaderWebSocket Module Contents --------------- .. py:class:: DownloaderWebSocket(/, **data: Any) Bases: :py:obj:`bundle.core.Downloader` Downloader implementation that streams progress to a websocket client. .. py:attribute:: websocket :type: fastapi.WebSocket | None :value: None .. py:method:: set_websocket(websocket: fastapi.WebSocket) -> None :async: Attach the websocket used for progress event emission. .. py:method:: start(byte_size: int) -> None :async: Emit transfer start with the total expected byte size. .. py:method:: update(byte_count: int) -> None :async: Emit incremental download progress. .. py:method:: end() -> None :async: Emit transfer completion to the websocket progress channel.