Module for downloading publicly-accessible files.
download(url: str, filename: str, sha256sum: str = None, mkdirs: bool = False)¶
Download the file located at
urland save it to path
sha256sumis specified, check the downloaded file’s sha256 hex digest against that value and raise an
IOErrorif they do not match. If
True, make any intermediate directories as required.
Format the size of a file in a human-readable way.
numis the file size, presumed to be in bytes. Specify
suffix='b'to indicate that the unit of