Google Sheets API v4:
Python Quickstart shows how to get data from a Google Spreadsheet:
result = service.spreadsheets().values()
.get(spreadsheetId=spreadsheetId, range=rangeName).execute()
values = result.get('values', [])
See https://developers.google.com/sheets/quickstart/python
Now, I have resolved the syntax for Batch Get:
I have tried the following but get null for 'values':
rangeName = ["Class Data!A2:E2","Class Data!A3:E3"]
result = service.spreadsheets().values().batchGet(
spreadsheetId=spreadsheetId, ranges=(rangeName)).execute()
for r in result['valueRanges']:
print (r.values()[0],r.values()[1])