esptest.tools.http_download module

esptest.tools.http_download.download_file(url, local_filename, timeout=None, progress=True)[source]

Download a file from a URL.

The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). This only works for HTTP, HTTPS and FTP connections.

Parameters:
  • url (str) – The URL of the file to download.

  • local_filename (str) – The local filename to save the downloaded file.

  • progress (bool) – Whether to show the download progress.

  • timeout (float | None)

Return type:

None