bw2io.download_utils
#
Module Contents#
Functions#
|
Download file from URL and show progress bar. |
|
Get filename from response headers or URL. |
- bw2io.download_utils.download_with_progressbar(url, filename=None, dirpath=None, chunk_size=4096 * 8)[source]#
Download file from URL and show progress bar.
- Parameters
url (str) – URL to download from.
filename (str, optional) – Filename to save to. If not given, will be determined from URL.
dirpath (str, optional) – Directory to save to. If not given, will be current working directory.
chunk_size (int, optional) – Chunk size to use when downloading.
- Returns
Path to downloaded file.
- Return type
pathlib.Path