Skip to content

Latest commit

 

History

History
 
 

python-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

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