The post below will not be updated, please refer to this page instead
Converting a Bottle program to be Google App Engine compatible:
- Downloaded Google App Engine Python SDK and used google_appengine/dev_appserver.py math_drill/ rather than python3 run.py to build while testing
- Added from bottle import * in the import statements (I think that fixed something)
- Added app = Bottle() in order to:
- Change all of the default @bottle.route() statements to @app.route() because that was causing errors
- Changed bottle.run() statement to be bottle.run(app=app, server="gae")
- Created a file app.yaml:
application: math-drill version: 1 runtime: python27 #Python3 not supported, so 2.7 was used api_version: 1 threadsafe: no #One tutorial said to do this, but since threads are not used it probably doesn't matter handlers: - url: /static static_dir: static - url: /.* script: run.app #Using run.py causes strange debug output to show up on the webpage
- With that all set up, it was uploaded to GAE using google_appengine/appcfg.py update math_drill/
Excellent post! I am very pleased with how fast images load from App Engine. I haven't had the chance to give this the time it deserves, but I will do that during the Thanksgiving break.
ReplyDelete