neuralib.io.dataset.google_drive_folder

neuralib.io.dataset.google_drive_folder(folder_id, *, quiet=False, output_dir=None, rename_folder=None, cached=False, invalid_cache=False)[source]

Download a entire folder from Google Drive. If not cached, then delete afterward.

Parameters:
  • folder_id (str) – Google Drive folder ID to download.

  • quiet (bool) – If True, suppress the gdown output.

  • output_dir (Path | None) – Directory where the folder should be downloaded. If None, a temporary directory is used.

  • rename_folder (str | None) – Optional new name for the downloaded folder.

  • cached (bool) – If True, keep the downloaded folder for future use.

  • invalid_cache (bool) – If True, force re-download even if cached data exists.

Returns:

A context manager yielding the path to the downloaded folder.

Return type:

Iterator[Path]