Live data from Hacker News

Ask HN: Best Python Framework for Google App Engine?

news.ycombinator.com

31–40 of 48 posts

Re: Ask HN: Best Python Framework for Google App Engine?

#31

Tornado is great as a standalone API/WWW server, but for WSGI-based environments, like Google App Engine, I would choose Flask (>= 0.7.1) over any other framework. Flask, despite being a micro-framework, is extremely powerful. It's core is well-written and there's a lot of useful extensions out there (like Flask-WTF or Flask-Assets). Flask also works really well with Google App Engine (see example skeleton: https://g…

I have used Tipfy for a couple of projects. It is VERY lightweight and flexible, and comes with jinja2 templating built in. Basically webapp + some missing components, like Session management. It's not even as close to as robust as Django-nonrel for GAE but depending on the scope of your project it might be perfect

Re: Ask HN: Best Python Framework for Google App Engine?

#32

A nice alternative to the built-in webapp framework is webapp2: http://code.google.com/p/webapp-improved/ It's basically a superset of webapp with some great additions and tweaks.

I'll second this suggestion. In my experience so far, webapp2 is a great way to get beyond some of the stranger idiosyncrasies of the default webapp without being overwhelmed or completely throwing away the benefits of Google's extensive documentation. If you like an extension or modified feature, use it. If not, do the way Google tells you to and it'll work just fine.

If you use nothing else, the extended routing functionality and lazy loading of handlers are big improvements and are pretty painless to implement.

Re: Ask HN: Best Python Framework for Google App Engine?

#33
post #22
post #21

Earlier quoted context omitted.

The real answer is "anything but Django." Django is a great framework, but not for GAE. I've used tipfy.org

Why is Django(-nonrel) a poor choice for GAE?

You said it yourself. The Django ORM is designed for relational databases. Django-nonrel seems to work, but it's a second-class citizen in the Django world. Much of the appeal of Django resides in the ecosystem of pluggable apps, and most of them won't work or will fail subtly when running on GAE.

Re: Ask HN: Best Python Framework for Google App Engine?

#34
For reasons that escape me, web2py doesn't seem to get much love, but deploying a web2py app to GAE takes all of 5 minutes. Web2py uses a DAL instead of an ORM, which means it's much easier to use the same data model on the non-relational datastore.

(The inevitable restrictions imposed by BigTable still apply, see http://www.web2py.com/AlterEgo/default/show/138).

Re: Ask HN: Best Python Framework for Google App Engine?

#35
post #22

Earlier quoted context omitted.

Why is Django(-nonrel) a poor choice for GAE?

You said it yourself. The Django ORM is designed for relational databases. Django-nonrel seems to work, but it's a second-class citizen in the Django world. Much of the appeal of Django resides in the ecosystem of pluggable apps, and most of them won't work or will fail subtly when running on GAE.

Okay, fair point about the third party apps. But even without them, it's not obvious to me that writing a Django-nonrel app from scratch is the worst option available.

Re: Ask HN: Best Python Framework for Google App Engine?

#36

For reasons that escape me, web2py doesn't seem to get much love, but deploying a web2py app to GAE takes all of 5 minutes. Web2py uses a DAL instead of an ORM, which means it's much easier to use the same data model on the non-relational datastore. (The inevitable restrictions imposed by BigTable still apply, see http://www.web2py.com/AlterEgo/default/show/138 ).

Does the web2py database abstraction layer support datastore transactions and query cursors? Or what datastore features it doesn't support?

(apparently the documentation doesn't mention any datastore feature it doesn't support but the last time I checked it did not support at least transactions)

Re: Ask HN: Best Python Framework for Google App Engine?

#37
post #35

Earlier quoted context omitted.

You said it yourself. The Django ORM is designed for relational databases. Django-nonrel seems to work, but it's a second-class citizen in the Django world. Much of the appeal of Django resides in the ecosystem of pluggable apps, and most of them won't work or will fail subtly when running on GAE.

Okay, fair point about the third party apps. But even without them, it's not obvious to me that writing a Django-nonrel app from scratch is the worst option available.

Django is a full-stack framework with a monolithic approach. The fact that it is possible to switch some of the components doesn't really mean that it is advisable to do so.

I've worked with Django for 3 years, and in my opinion Django actually has a non-negligible learning curve. If you have to give up the benefits of the full-stack approach and of the Django ecosystem of pluggable apps, you might as well go with something simpler, such as Bottle or Flask, or choose a full-stack framework that officially supports GAE, such as web2py.

Re: Ask HN: Best Python Framework for Google App Engine?

#38
post #23
post #13

I like Bottle: http://bottlepy.org/docs/dev/

I've used bottle for many projects and I'm very happy with it. A new version was just released a few days ago as well.

One thing that I love about bottle is that it is one of the few web frameworks that supports Python 3 (as does CherryPy, I'm told). Not that it matters one bit if you're running on GAE, which only supports Python 2.5.

Re: Ask HN: Best Python Framework for Google App Engine?

#39
post #23
post #13

I like Bottle: http://bottlepy.org/docs/dev/

I've used bottle for many projects and I'm very happy with it. A new version was just released a few days ago as well.

one nice thing about the web2py Data Abstraction Layer is that it doesn't have any dependencies. It's just a single file, and it seems to be pretty easy to use with Bottle, which doesn't have any data abstraction layer:

http://martin.tecnodoc.com.ar/default/post/2011/05/25/21_bot...

Re: Ask HN: Best Python Framework for Google App Engine?

#40
post #36

For reasons that escape me, web2py doesn't seem to get much love, but deploying a web2py app to GAE takes all of 5 minutes. Web2py uses a DAL instead of an ORM, which means it's much easier to use the same data model on the non-relational datastore. (The inevitable restrictions imposed by BigTable still apply, see http://www.web2py.com/AlterEgo/default/show/138 ).

Does the web2py database abstraction layer support datastore transactions and query cursors? Or what datastore features it doesn't support? (apparently the documentation doesn't mention any datastore feature it doesn't support but the last time I checked it did not support at least transactions)

I don't know, I haven't had to do transactions. Another advantage of the web2py DAL is that it doesn't have any dependencies. It's just a single file which could be used by any other web framework to decouple from BigTable and enhance portability. An Argentinian developer shows how easy it is to use the web2py DAL with Bottle:

http://martin.tecnodoc.com.ar/default/post/2011/05/25/21_bot...

Post reply on HN