Last active
May 15, 2017 00:33
-
-
Save popowa/f27d55719c05a0d732cb410269409441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pythonのバージョン指定があったので、pyenvで入れてから以下の対応する | |
$ pyenv install 3.4.5 | |
$ pip install oauth2client | |
$ gcloud components update | |
--- | |
mba13:RaspberryPi aya$ gcloud auth application-default login | |
Your browser has been opened to visit: | |
https://accounts.google.com/o/oauth2/auth?redirect_uri=hogehoge | |
Credentials saved to file: [/Users/hogehoge/.config/gcloud/application_default_credentials.json] | |
These credentials will be used by any library that requests | |
Application Default Credentials. | |
Updates are available for some Cloud SDK components. To install them, | |
please run: | |
$ gcloud components update | |
mba13:RaspberryPi aya$ python | |
Python 3.5.2 (default, Jul 3 2016, 14:19:21) | |
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from oauth2client.client import GoogleCredentials | |
>>> credentials = GoogleCredentials.get_application_default() | |
>>> from googleapiclient.discovery import build | |
>>> service = build('fusiontables', 'v2', credentials=credentials) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment