Reputation: 905
How to access a spreadsheet document in python from Google Sheets using Sheets API ? I was trying to access a document in my google account. So Will API key be sufficient or should we go with Oauth2client?
Upvotes: 0
Views: 153
Reputation: 8836
You can try using the library Gspread for accessing google spreadsheets. You can install gspread using the command
pip install gspread
or
pip install https://github.com/burnash/gspread/archive/master.zip
I have written a detailed blog on how to access google sheets in python using gspread. This might help you.
Upvotes: 1
Reputation: 17613
You can just use the OAuth2 flow. The credentials will be stored in your client_secret.json. This procedure is detailed in the Python Quickstart Sheets API guide.
Step 1: Turn on the Google Sheets API
Step 2: Install the Google Client Library
Step 3: Set up the sample
Upvotes: 1