Google Client APIs placeholders to use in projects.
-
To use Google Cloud services we need to have API access credentails for our project.
-
See Creating authorization credentials for how to obtain a
client_secrets.jsonfile.
These credentials are needed to interact with different services.
from google_auth_oauthlib.flow import InstalledAppFlow
...
flow = InstalledAppFlow.from_client_secrets_file(
'path_to_directory/client_secret.json',
scopes=['service_1', 'service_2', ...])- See Getting Started for more info.
- We need to manually create a spreadsheet within Google Sheet and copy the spreadsheets ID
upload_df_to_sheetfunction uploads the Pandas Dataframe intospreadsheet_id.upload_image_to_sheetfunction uploads an image fromimage_pathpath intospreadsheet_id.- Using
range_nameparameter we can specify in which tab to insert our data and which cell to take as starting point.
