Stack OverflowWhich Python framework is best for web development in Google App Engine?
[+36] [19] Riyaz Mohammed Ibrahim
[2008-09-16 10:08:30]
[ python google-app-engine frameworks ]

Which Python framework is best for web development in Google App Engine?

[+20] [2008-09-16 10:13:20] Codeslayer

webapp is the framework which is bundled with google app engine. The webapp framework is already installed in the app engine environment and in the SDK, so you do not need to bundle it with your application code to use it.

Besides webapp, app engine environment also supports Django, Pylons and

(1) here is a link: - Piotr Findeisen
(1) webbapp is the best because it's preinstalled? so django is the best too. - Jacek Ławrynowicz
Also check -- single file, compatible with webapp but with a bunch of improvements. - moraes
[+13] [2008-09-16 10:15:48] lbz [ACCEPTED]

If you are looking for a full stack framework Django is probably what you are looking for. Here [1] you can find an article about Running Django on Google App Engine.


(4) I don't think this answers the question very well. I'd like to see a few more options mentioned. In particular, what I want to know is what it takes to set the other options up such as Pylons and Turbo Gears. - allyourcode
(1) Keep in mind that the link from this answer is now obsolete. The version of Django included in app engine is ancient and no one suggests using it any more. - newz2000
[+8] [2011-02-17 03:24:13] michael

Some addon:

Light framework comparisons for Bottle, Flask, tipfy, webapp,

[+7] [2010-10-20 11:25:13] brutuscat


tipfy is a small but powerful framework made specifically for Google App Engine. It is a lot like webapp:

from tipfy import RequestHandler, Response
class HelloWorldHandler(RequestHandler):
    def get(self):
        return Response('Hello, World!')

...but offers a bunch of features and goodies that webapp misses: i18n, sessions, own authentication, flash messages and more. Everything in a modular, lightweight way, tuned for App Engine. You use only what you need, when you need.

[+5] [2010-06-16 22:54:08] systempuntoout

I would suggest webpy [1], it's simple and powerful; here [2] you can find a tiny review.
I've developed StackPrinter [3] and GAEcupboard [4] with on top of Google App Engine.
Source code here [5].


(1) This post needs more upvotes. Thank you systempuntout - abel
[+5] [2008-09-16 19:30:33] zgoda

As has been said, Django is already there, but WebOb [1] is also available there. You can build your own framework upon that (see the tutorial [2]).


your answer which framework is available and how to build your own. how is that related to the question? - Jacek Ławrynowicz
[+4] [2010-03-03 17:59:29] watr

Web2py is my choice just because of ease of migration and ease of deployment and testing/development on.

web2py works seamlessly on appengine but i think it sometimes "hides" the virtues of appengine such as Extendeo models - PanosJee
[+3] [2008-09-16 15:24:19] dobrych

I can recommend Django too. It has nice support by Google and community. Lots of examples and internal power of framework itself can save much time on coding.

[+3] [2008-09-16 10:14:39] Rich Adams

I would suggest Django [1] as a good Python framework. There are some articles [2] on Google which describe how you can use it with Google App Engine.

It's already included in App Engine, so all you need to do is import the Django modules as normal.


[+3] [2010-06-05 02:46:05] newz2000

I built an app engine site using Django and found a few hidden problems. One is that to get the benefits of Django (admin area, orm integration) you need to use a patch. I chose the app-engine-patch which worked great for local dev however on production had a 10 second start up delay on each page view after the site had been idle for about a minute. Then the developers of the patch abandoned it. They've moved their work to django-nonrel which has lofty goals but, according to django-con EU will not be part of the official django in the same way the built in ORM is. So basically, a django app for app engine is going to be different than a normal django app.

Instead I recommend web2py or App Engine Oil. web2py has a special, officially supported by the devs, mode that enables compatibility with App Engine. It turns off a few features of web2py. Your app is portable to any hosting service though. Oil is a Rails like framework built just for app engine.

Just a note on this - App Engine is adding support for SQL databases which opens options up a bit. However, the problem with performance that I referred to here may still be valid, because it's related to the application having too many files, therefore being uploaded as a zip file. When the app is unloaded from memory it takes a fair amount of time to be unzipped and loaded the first time. - newz2000
[+2] [2008-09-27 15:41:07] community_owned

Like CodeSlayer said, google app engine have bundle some frameworks. but if you want to use it with others you can read this article
Running Django on Google App Engine [1]
And if you need some IDE, these tutorials may help
Configuring Eclipse on Windows to Use With Google App Engine [2]
Using Komodo Edit as an IDE for Google App Engine [3]


Pydev now has inbuilt support for app-engine projects - Casebash
[+2] [2011-01-11 11:20:07] Gabrielo Palermo Maffort

There is one important thing to consider before making a decision: are you sure, you always ever want to stay with appengine with your project? If your project grows and grows and at one point you will realize that it is too late to rewrite [1] your project - but exactly then you also realize, that for some reason you want your project to run of your own servers, maybe because you do a wikileaks clone or anything else that you want to be sure google can not shut down because it does not fit their terms - what do you do then? So it seems to be wise to select a framework that does not work only on appenginge, so you do not close the door behind you forever :)


[+2] [2011-02-26 16:55:17] Rutwick

I used Bottle Python with GAE. Its extremely small (71 KB only!) and quite sufficient to run small to mid sized apps. You can learn to use Bottle with GAE from here [1]. I found it very easy to get along with and no fuss of a lot of config and edits!


[+1] [2011-07-01 11:55:37] moraes

webapp2 [1], which is basically a superset of webapp with some great additions and tweaks.

A big advantage of webapp2 is that you can use existing (and probably future) SDK libraries without adaptation. Many App Engine services (blobstore, mail handler, deferred etc) use handlers made for webapp. With webapp2 you get all those handlers working out of the box with extra benefits: webapp2 is a lot easier to extend and includes the most glaring webapp missing features.

Also, you can use all the examples from the App Engine documentation with it, since it is made to be compatible with webapp. And later you learn the new, extended features.


[+1] [2011-02-03 04:12:20] dfrankow

We picked Tornado [1] because it is lightweight and fast, especially on cold start, which is an app engine issue for low-traffic apps. It's even faster than webapp (!) because webapp loads the Django templating system.

We've been happy with Tornado, although it doesn't have as much support for some stuff (e.g., web forms). It does have a templating language which is just embedded python. I like having the power to have a reasonable "if" statement or "for" loop, even though most people believe that embedding complex logic in templates will produce spaghetti.


copy-pasted serveral times all over the Interent - qliq
Likely by me. If I run across such a question in a forum that I feel like answering (Quora, Hacker News), I just come back here grab my own answer and paste it. Anything wrong with that? - dfrankow
[+1] [2010-04-06 09:51:04] torger

Bottle or Itty, with jinja2 as the templating language -> Basically sinatrarb for python.

[+1] [2010-07-06 11:03:21] Johan Carlsson

I really like Google AppEngine Oil. Unfortunatelly the project seems to have come to a halt? But I've used 3.0 in a couple of projects to great success. (I am a TurboGears fan initially.)

[0] [2008-12-24 20:36:19] Rob Williams

I want to know how to run the CherryPy web server in the Google App Engine [1], because I like it best, plus I want to know how to integrate the StringTemplate engine into the CherryPy web server [2] so that I can use it there, too.

I have used CherryPy stand-alone and with TurboGears.


[-1] [2008-12-24 20:37:32] maurycy

Isn't Django recommended by Guido, which is now a Google employee?

(2) Guido claims to be impartial as far as what framework you should use; however, this may just be a political move to avoid upsetting fans of other frameworks. It does seem that he has plugged Django more than the others. - allyourcode he was more than neutral about web frameworks. - Łukasz
(1) Kind of amusing, since Google's Python Style Guide, under "Python Language Rules -> Power Features" says "Python is an extremely flexible language and gives you many fancy features such as metaclasses ... Decision: Avoid these features in your code", and Django's ORM depends on metaclasses. - Mike DeSimone
(3) Guido's comment was from 2006, when black and white tv was the norm. - speedplane