Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 1.29 KB

README.md

File metadata and controls

81 lines (55 loc) · 1.29 KB

Python guestbook server

Prepare

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

run server:

cd guestbook
dev_appserver.py ./

Browse application

Deploy

appcfg.py --oauth2 update guestbook/

Usage from python

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()