download_from_google
- download_from_google(file_id: str, path: str | Path, force: bool = True, clean_on_failure: bool = True, hexdigests: Mapping[str, str] | None = None) None[source]
Download a file from google drive.
Implementation inspired by https://github.com/ndrplz/google-drive-downloader.
- Parameters:
file_id – The google file identifier
path – The place to write the file
force – If false and the file already exists, will not re-download.
clean_on_failure – If true, will delete the file on any exception raised during download
hexdigests – The expected hexdigests as (algorithm_name, expected_hex_digest) pairs.
- Raises:
Exception – Thrown if an error besides a keyboard interrupt is thrown during download
KeyboardInterrupt – If a keyboard interrupt is thrown during download
UnexpectedDirectory – If a directory is given for the
pathargument