Tired of not working Google Authorisation for your requests? This module is what you need! Helps you to login into Google Analytics or Google Spreadsheets
Also needed modules:
-
Google API. To install: pip install --upgrade google-api-python-client
-
json
-
httplib2
-
oauth2client - any version (hopefully) will do, so you can keep using your favorite version without upgrading
To work with Google Spreadsheets I recommend gspread (https://github.com/burnash/gspread)
First you need to make some preparations. How to obtain OAuth2 credentials from Google Developers Console:
-
Head to Google Developers Console (https://console.developers.google.com/iam-admin/projects) and create a new project (or select the one you have.)
-
Under “API & auth”, in the API enable "Analytics API" and "Drive API"
-
Go to “Credentials” and choose “New Credentials > Service Account Key”
-
You will automatically download a JSON file with this data. Store it somewhere safe, you'll need path to it later