src.data.download.download_from_google_drive¶
-
src.data.download.download_from_google_drive(url, output_file, pooch)¶ A downloader to fetch files from Google Drive.
Unlike some data sources, large files on Google Drive can’t be downloaded by just pointing to a URL. This function uses a workaround from the gdown package so that a
pooch.Poochinstance can fetch Google Drive files.Don’t call this function directly. Instead, it works as the
downloadargument forpooch.Pooch.fetchorpooch.retrieve. See the Pooch documentation for details.To get the
urlfor a file in Google Drive, use this template:"https://drive.google.com/uc?id=MY-FILE-ID"To fill in
MY-FILE-ID, right click the file in Google Drive, and select “Get shareable link,” copying out the UUID in the generated link.Parameters: - url – The URL for the file to download.
- output_file – The path to the output file.
- pooch – The Pooch instance calling this method.
Returns: Output file name.
Return type: