Supports Google Auth but I dont know how to explain it, defaults to False
Auth uses the following env varsENABLE_AUTH_REQ,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,ALLOWED_DOMAINS, andALLOWED_EMAILS
You can also useBASE_SECRETto define a static secret for your flask session, otherwise it will be random
-
Go to https://console.cloud.google.com and create a project.
-
In Quick Access, click APIs & Services.
-
At the top, press Enable APIs and services.
-
Add the following APIs:
Google Sheets APIGoogle Drive API
-
Return to https://console.cloud.google.com.
-
Under Quick Access, press IAM & Admin.
-
In the sidebar, click Service Accounts.
-
Near the top, click Create Service Account.
-
Enter a name (e.g.,
stocky) and press Create and Continue. -
Under Select a role, choose:
- Basic > Editor
-
Press Done.
- Click the account you just created.
- Go to the Keys tab.
- Click Add Key > Create New Key.
- Select JSON, then press Create.
- Download the JSON file.
- Open https://www.base64encode.org/
- Paste the entire contents of the
.jsonfile and copy the output.
You'll need to define the following three variables:
GOOGLE_CREDS— the base64-encoded JSON from aboveGOOGLE_SHEET_URL— link to your spreadsheetGOOGLE_FOLDER_URL— link to your Drive folder
- Create a spreadsheet and a folder in Google Drive.
- Share both with the service account email (looks like
stocky@exampleproject.iam.gserviceaccount.com) and give it Editor access.
- Download
spreadsheet_template.xlsx. - Go to your spreadsheet in Google Drive.
- Click File > Import.
- Go to the Upload tab, select the file.
- Change Import location to Replace spreadsheet and press Import data.