-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
20 lines (15 loc) · 731 Bytes
/
config.py
File metadata and controls
20 lines (15 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
### GLOBAL VARIABLE MODULE ###
import gspread
from oauth2client.service_account import ServiceAccountCredentials
# GLOBAL Variables that change with the text boxes
CELL_COL = "D"
CELL_CONTENT = "1"
GOOGLE_SHEETS_FILENAME = "Copy of 20-21 Points Sheet Template (Color Change)"
# use creds to create a client to interact with the Google Drive API
scope = ['https://spreadsheets.google.com/feeds',
'https://www.googleapis.com/auth/drive']
creds = ServiceAccountCredentials.from_json_keyfile_name('client_secret.json', scope)
client = gspread.authorize(creds)
# Find a workbook by name and open the first sheet
# Make sure you use the right name here.
sheet = client.open(GOOGLE_SHEETS_FILENAME).sheet1