:py:mod:`connection` ==================== .. py:module:: conda.gateways.connection .. toctree:: :hidden: :titlesonly: :maxdepth: 3 adapters/index.rst download/index.rst session/index.rst Classes ------- .. autoapisummary:: conda.gateways.connection.DirectDownloadAdapter .. py:class:: DirectDownloadAdapter Bases: :py:obj:`Protocol` Protocol for adapters that support optimized direct-to-file downloads. Adapters implementing this protocol can bypass the standard streaming path and write directly to a file object, avoiding intermediate buffering. .. py:method:: direct_download(url: str, fileobj: IO[bytes], progress_callback: collections.abc.Callable[[float], None] | None = None, size: int | None = None) -> None Download directly to a file object. :param url: URL to download from :param fileobj: File object to write to (binary write mode) :param progress_callback: Optional callback(fraction) where fraction is 0.0-1.0 :param size: Content length (required for progress reporting)