Differences
This shows you the differences between two versions of the page.
lwc:google_api:python [2020/11/26 17:51] – created John Harrison | lwc:google_api:python [2020/11/27 20:15] (current) – John Harrison | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Welcome to [[https:// | + | **Welcome to [[https:// |
- | \\ | + | |
- | ** | + | |
- | **setup:\\ | + | **setup:** |
- | ** | + | |
* in some setup directory git clone https: | * in some setup directory git clone https: | ||
* install: sudo python setup.py install | * install: sudo python setup.py install | ||
* install oath2client: | * install oath2client: | ||
- | * generate/ | + | * generate/ |
- | + | * add in .bashrc: export GOOGLE_APPLICATION_CREDENTIALS="/ | |
- | * add in .bashrc: export GOOGLE_APPLICATION_CREDENTIALS="/ | + | |
- | + | ||
You will get a " | You will get a " | ||
- | + | Creating the credentials: | |
- | \\ | + | |
- | Creating the credentials: | + | |
* [[http:// | * [[http:// | ||
- | * I created an app engine, having no idea which engine to pick. There' | + | * I created an app engine, having no idea which engine to pick. There' |
- | One option for credentials with gspread:\\ | + | One option for credentials with gspread: |
from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() credentials = credentials.create_scoped([' | from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() credentials = credentials.create_scoped([' | ||
gs = gspread.authorize(credentials)\\ | gs = gspread.authorize(credentials)\\ | ||
- | sheet = gs.open(' | + | sheet = gs.open(' |
- | \\ | + | |
Line 41: | Line 31: | ||
Using the latest Gspread (0.6.2) on 14.04 | Using the latest Gspread (0.6.2) on 14.04 | ||
- | |||
- | \\ | ||
- | |||
Update requests: | Update requests: | ||
- | < | ||
< | < | ||
| | ||
Line 55: | Line 41: | ||
| | ||
</ | </ | ||
- | < | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- |