Skip to content

Googledrive

flowtask.interfaces.GoogleDrive

GoogleDriveClient

GoogleDriveClient(*args, credentials=None, **kwargs)

Bases: GoogleClient, ABC

Google Drive Client for downloading files from Google Drive.

download_file async

download_file(source_filename, destination_dir='.')

Download a file from Google Drive by its name.

Parameters:

Name Type Description Default
source_filename str

The name of the file to download.

required
destination_dir str or Path

Directory where the file will be saved (default is current directory).

'.'

Returns:

Name Type Description
str PurePath

Path to the downloaded file.

download_folder async

download_folder(folder_name, destination_dir='.')

Download all files within a specified Google Drive folder by name.

Parameters:

Name Type Description Default
folder_name str

The name of the folder to download.

required
destination_dir str or Path

Directory where the files will be saved.

'.'

Returns:

Type Description
None

None