Skip to content

Instantly share code, notes, and snippets.

@spacetime
Created February 19, 2012 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacetime/1863968 to your computer and use it in GitHub Desktop.
Save spacetime/1863968 to your computer and use it in GitHub Desktop.
Simple AppEngine code to add two numbers
#Bare bones Example used to demonstrate processing by AppEngine for data sent through the Android app
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
class MainHandler(webapp.RequestHandler):
def post(self):
num1 = self.request.get('num1')
num2 = self.request.get('num2')
num3= int(num1)*int(num2)
self.response.out.write(num3)
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
util.run_wsgi_app(application)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment