Here snakey, snakey, snake
September 12, 2007 7:17 PM   Subscribe

What's the de facto python web framework in active development/use today?

Hi, For my next small project, I've settled that I would like to use a python-based framework. What's the best one out there today? This isn't meant to start a flame war. I think I'm primarily looking at TurboGears, Django, and is appealing because of its small size and simplicity. However I am having trouble nailing down best practices in terms of application design. It is almost too free form to be considered a framework IMHO. I need structure and limitations! Also, I am worried about the lack of documentation and updates. On the other end of the spectrum TurboGears seems jam packed with features and doohickeys I'm not sure I'll ever need. What's anyone out there using? I'd love to hear your experiences and what you are using different frameworks for currently.
posted by zackola to Computers & Internet (12 answers total) 7 users marked this as a favorite
The short answer is Django. Its installed base is larger than the others and it has quite a few production sites already up. Documentation is pretty good, although it lags behind the actual code usually. A book will be out soon.
It's pretty much the best choice.
posted by tmcw at 7:20 PM on September 12, 2007

Python hasn't settled on one web framework the way that Ruby has on Rails. But I think Django has the most support amongst the Python community: Python's creator recently endorsed it, and if Python ever settles down and sticks with one framework, it'll probably be Django.

I like Django because, although like every other framework it's not perfect, most of the time it 'just works' the way you'd want it to. TurboGears, on the other hand, is cobbled together out of a variety of discrete parts. Django has great documentation.
posted by Aloysius Bear at 7:24 PM on September 12, 2007

Best answer: Ask Ian Bicking.
posted by i_am_joe's_spleen at 9:00 PM on September 12, 2007

PS: Pylons is up and coming and I would look hard at it. However, Pylons and TurboGears both look like moving targets to me right now. Personally I am right now hacking on a small project with Colubrid as an appserver, Kid for templates, and a hand-rolled persistence layer, and I am greatly enjoying the freedom this gives me. Because of WSGI many things can be more or less mix-and-match put together to make a stack of your own devising.
posted by i_am_joe's_spleen at 9:03 PM on September 12, 2007

The folks I know who are doing webapps in Python have mostly switched over to Django. I've poked at Django a bit. The documentation is O.K. and getting better. There's no baked in support of AJAX, though that leaves you more flexibility to pick-and-choose. The IRC channel is active and reasonably friendly.
posted by dws at 9:10 PM on September 12, 2007

TurboGears, on the other hand, is cobbled together out of a variety of discrete parts.

I could be wrong, but I thought that for TG and for Pylons that was more or less a design goal. You like Mako templates? Have Mako templates? You like Kid? So use Kid. SQLObject or SQLAlchemy for an ORM - take your pick. And so on. So they're more literally frameworks. Whether that's good or bad depends on what you're after, I think.
posted by i_am_joe's_spleen at 9:27 PM on September 12, 2007

<derail>Rails is very popular, but it's not the only Ruby web framework people use. There's at least one other megaframework in the form of Nitro, and half a dozen smaller frameworks like Merb, Camping, Rack (similar to and a few others. They just don't have quite so many PHP escapees fawning all over them...</derail>
posted by Freaky at 5:01 AM on September 13, 2007

I loved Django so much that I moved halfway across the US to go work for the company that started it. :P
posted by korpios at 8:43 AM on September 13, 2007

I used to love TurboGears and the design philosophy of not reinventing the wheel, but once I tried out Django I never went back. It is unusually polished for a pre 1.0 version. There is a book at I continue to be amazed how easy it is to make websites with Django and how well everything works. I used to be a purist who hated template languages like Django's builtin template language, but I have even come to like that.

But all the frameworks are so easy to try out, I would recommend just following the respective tutorials and see for yourself what you like best, because it also depends on the kind of site you will be making. Django rules when it comes to cms-functionality for example, but like others said, it lacks in the ajax-integration department.
posted by davar at 9:39 AM on September 13, 2007

Best answer: I'm not sure you will find a 'best' framework; the three main MVC frameworks (Django, TurboGears and Pylons) will suit different developers and different applications differently. I would encourage you to review those three, check out the docs, the philosophy behind the framework, and perhaps ask for thoughts on their suitability for your needs on respective mailing lists or IRC. Also note that TurboGears 2.0 will be built on top of Pylons.

In short, all three will probably let you do what you want, with varying degrees of simplicity, adaptability, extendability, hand-holding, hidden magic and documentation. Try to figure out which of those things (or other criterion) matters most to you, then pick the framework that seems the best fit.

A couple links found in my bookmarks that may or may not help:

Unscientific and biased comparison of Django, Pylons, and TurboGears
Python framework design
Full Stack vs. Glue (a response to previous link)
posted by MetaMonkey at 12:35 PM on September 13, 2007

django's probably the most "manager friendly" because of its acceptance and use by several major corporations (Knight-Ridder uses it for a lot of small local papers, WPNI uses it and used to employ one of the lead devs).
posted by feloniousmonk at 2:07 PM on September 13, 2007

Best answer: Yeah, Django's the short answer. Here's my long one.

Hoo. Like many programming questions that don't have an obvious and demonstrably right answer, the choice of web framework is largely a religious issue. Fortunately, with Python your choice doesn't matter as much as with other languages provided you pick something built on the WSGI (speaking of which, Ian Bicking wrote a good hands-on tutorial. It uses a bit of Paste, but not much).

I think it comes down to two main contenders: Django and Pylons. People have spilled a lot of ink on comparisons, but briefly:

Django gives you a ton out of the box and if it does what you want, you'll be super productive in no time flat. But like all full-stack frameworks, if your last 5% is at odds with the design goals of the framework, that's where you'll spend 95% of your time.

Pylons is much more flexible, because it's basically glue between components you can pick yourself. This means you're less beholden to the framework, but you get less for free.

Since Django 0.95 I've found it to be a solid framework that gives you more than it costs. Django 0.91 had some frankly bizarre behaviors, but most of them are now long gone.

If I had a really idiosyncratic app in mind I'd pick Pylons. But if I had to bang out a standard web app quick and cheap without losing my mind I'd pick Django. What should you do? davar is wise: run through all the tutorials and pick the one you like best.
posted by amery at 4:13 PM on September 13, 2007

« Older How do I share a folder between users on a single...   |   Paying a real estate agent I never buy through Newer »
This thread is closed to new comments.