Skip to content

Googleclient

flowtask.interfaces.GoogleClient

GoogleClient

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

Bases: ABC

Google Client Client.

Managing Authentication and resources from Google Apps.

close

close()

Clears cached credentials and services.

get_drive_client

get_drive_client()

Shortcut for accessing the Google Drive client.

get_search(query, version='v1', cse_id=None, **kwargs)

Get a cached Google API service instance or create one if not cached.

Args:

query (str): The search query.
version (str): Version of the API (default: 'v1').
cse_id (str): The Custom Search Engine ID.
**kwargs: Additional arguments for the API request.

Returns:

Type Description

googleapiclient.discovery.Resource: The requested Google API service client.

get_service

get_service(service, version='v3')

Get a cached Google API service instance or create one if not cached.

Parameters:

Name Type Description Default
service str

Name of the Google service (e.g., 'drive', 'sheets').

required
version str

Version of the API (default: 'v3').

'v3'

Returns:

Type Description

googleapiclient.discovery.Resource: The requested Google API service client.

get_sheets_client

get_sheets_client()

Shortcut for accessing the Google Sheets client.