appid
you created.. git fetch ; git merge origin/master
from the main directory of the package.).app.yaml
to have the application match the application you created. google_appengine/appcfg.py --email=youremail@gmail.com --no_cookies update web2py-student-starter/
http://127.0.0.1:8888/classexample/default/get.json/behappy/luca/12
for testing (or to whatever other URL you need to use, see below for more information). google_appengine/dev_appserver.py --port 8888 --admin_port 8880 web2py-student-starter/
The package contains a very simple app, classexample, which can be used as a key value store.
You can use it as follows:
First, change MYSECRET
in applications/classexample/controllers/default.py
to be yoursecret
.
To write a piece of data, you can do:
https://appid.appspot.com/classexample/default/put.json/yoursecret/appname/key?c=hello
Where:
You can also use a POST request, assigning to the variable c the value you want to store for appname and key.
To read, you can use:
https://appid.appspot.com/classexample/default/get.json/yoursecret/appname/key
and you will get a reply like:
{"result": "hello"}
that you can decode using json.
If you include MYSECRET
in your Android app, and always use ssl (https) as above to access your appengine app, you will have at least a modicum of security. But always use https, otherwise the information will be sent around in the clear.
To create your app, instead of classexample
, simply copy applications/classexample
to applications/yourapp
.
Then:
yourapp/models/tables.py
if you wish to define different tables. appid.appspot.com/yourapp/f/g.json
maps to a function g()
(without arguments) defined in yourapp/controllers/f.py
. See the example in the class app.