install python from brew
brew install python
install google cloud
curl https://sdk.cloud.google.com | bash
install google cloud gae extension
gcloud components update gae-python
create virtualenv in python-server
drectory :
virtualenv --python /usr/local/Cellar/python/2.7.8_1/bin/python2.7 --no-site-packages venv
run virutalenv:
. ./venv/bin/activate
install requrements:
cd guestbook
pip install --upgrade -r requirements.txt
setup google app engine environment
cd guestbook
gaenv
run server:
cd guestbook
dev_appserver.py ./
- [Application[(http://localhost:8080)
- Api browser
- Api Explorer
appcfg.py --oauth2 update guestbook/
from apiclient.discovery import build
guestbook = build('guestbook', 'v1', discoveryServiceUrl="https://atlantean-field-90117.appspot.com/_ah/api/discovery/v1/apis/{api}/{apiVersion}/rest")
dir(guestbook)
guestbook.listPosts().execute()