Six Python Web Frameworks Compared
snydeq writes "InfoWorld's Rick Grehan provides an in-depth comparison of six Python Web frameworks, including CubicWeb, Django, Pyramid, Web.py, Web2py, and Zope 2. 'No matter what your needs or leanings as a Python developer might be, one of these frameworks promises to be a good fit,' Grehan writes. 'As usual, the choice is highly subjective. You will find zealots for each product, and every zealot is able to present rational reasons why their chosen framework is superior.'"
Really. Best of the lot. Much more direct than those oblique, "All-England Summarise Proust Competition" bits. Leave the PhD at home, and make 'em larf a bit!
"Flyin' in just a sweet place,
Never been known to fail..."
Why isn't the Twisted web framework evaluated? It's one of the most popular for python.
Any python web framework shootout that features neither a flask nor a bottle is not worth drink...err reading!
It's The Golden Rule: "He who has the gold makes the rules."
EVE is built on IronPython. I'd say that's pretty impressive and worth a comparison when talking about web targeted python
Oh really? The subject is "python web frameworks" and you assert that a ruby implementation will score well in this competition? I gotta ask, what version of python does "ruby on rails" support?
It doesn't matter which Python framework you choose. At least you're not using PHP!
What the hell is that? Why was it chosen instead of flak/twisted/tornado/etc?
I'm sorry to see he didn't consider Flask. I've found it to be a beautiful microframework suited for any task one might use Web.py for.
If you are browsing for Python frameworks, you should give it a look.
Just asking.
I dig python. I chose python + sqlite to clean data instead of excel and vba.
1.) It's free (speech/beer)
2.) It's multiplatform
3.) It runs on my freebsd machine as easily as on my mac desktop
4.) I can use a sqlite database exactly like a postgresql or mysql db in the python api (handy).
5.) It added a line to my resume!
etc etc
I hope to never use python as a web designer (because I don't want to be a web dev - no offense). But, I definitely appreciate its generality.
PS: I don't reply to ACs.
Surely you are joking?
The last time I tinkered with Django, I tried writing a simple CRUD app for an existing database at my job. After wasting a few hours learning how the ORM package works and setting up my models, I came to realize that Django does not support database tables with composite primary keys . In other words, it doesn't work with almost any legacy database that you will find in any enterprise shop on the planet. It wasn't worth re-working the schema, so I had to retreat back to Spring MVC and wrestle its XML.
I'll give Django credit, though. It's still several steps ahead of Ruby on Rails, which my last experiment taught me doesn't support more than one database per app !
I make a point to take one these "dynamic language" frameworks for a spin every 6-12 months... because I keep hearing that they are leapfrogging Java, and Oracle is destroying the universe anyway, and my career will be over soon if I don't migrate my skillset. So far I'm just not seeing it, though. These frameworks may be useful for simple non-commerce apps, stood up in a hurry by junior-level devs... but none of them seem remotely ready for any of the realities I deal with day-to-day when working for large companies or handling commerce.
Python code is very easy to read. You can code something in fewer lines. The result is fewer bugs and easier troubleshooting.
Ease of reading Python code makes it easy to pick up someone else's code or even your own code after a year or so.
If Python will do the job, it's my automatic choice. For code that I write for my own use, that means almost anything that isn't embedded or a device driver.
While I'd like to it not be the case, I'd have to agree with you about the general not-quite-there-yet state of dynamic frameworks. That said, Django's custom ORM leaves much to be desired. Next time you decide to give a python framework a try, pick one which uses SQLAlchemy as it's ORM layer. You'll find it to be a much more sophisticated library (similar to Java's Hibernate). In particular, it has all the features you just mentioned. Not integrating SQLAlchemy is one of the main things that keeps me from using Django... any other ORM layer in Python seems doomed to play catch-up.
I've coded a few small apps in Python, mostly for scientific/engineering applications (nothing big). Not being a CS major, I've never felt comfortable with GUI apps with Python or Django. Is there any "dummies guide" that guides you step-by-step in creating a webpage? I'd love to create a page where I can store engineering data on a server, and have a Python coded page pull that data and display it in graphs with user preferences (for example, say plotting thermal conductivity of a material vs. strength from a drop menu). Out of my league here?
Web.py is great for developing web services. Really, really quick and easy to learn. The documentation is probably about a 7 though, I agree with that. However, I'd give it 9s on everything else.
Web.py+mimerender is pretty sweet. Check out the example code here:
http://stackoverflow.com/questions/713847/recommendations-of-python-rest-web-services-framework
I find this infinitely more comprehensible, pythonic, and nice to work with than the other Python web frameworks I've seen. I've never really used Django, but the examples I've seen look pukey to me.
It was probably the best all-in-one python webapp-building mega-framework 5 years ago.
I found Turbogears great because it eliminated (unnecessary) choices (i.e. all mandatory convention),
and pretty much just worked out of the box (modify a working trivial webapp was the way you got started.)
How does its latest version compare to these others? Anyone have an opinion on that?
If TG is no longer competitve, why, and which other one has its good features like I described above?
Where are we going and why are we in a handbasket?
http://www.tornadoweb.org/ -- This one looks interesting to me. I would like to try this one. Anyone used it?
Maybe CPUs are so cheap these days that it doesn't matter, but I really like to see speed/performance as a metric when evaluating the technology that runs my website.
Do you really need reason for beer? Wingman Brewers
Heard of Django and looked inside Zope, never heard of the others.
Oh, and don't care (same goes for these ridiculous Ruby based things).
PHP won the war. (And I'm speaking as a heavy duty Python devel btw).
The only python one I have tried and liked so far is tornado.
Got Code?
yeah the article is missing bottle, flask, and it's pretty thin on content. probably better to reference php versus the r-langauge.
I haven't looked seriously at any other Python web frameworks besides Django, but I've found web2py to be a wonderful environment to work with. Coming from Rails, web2py's philosophy of ensuring new releases maintain backwards compatibility is an ENORMOUS plus - I got sick of tracking down new problems in my existing codebase with each new major Rails release. I understand why Rails does this, but in practice it's incredibly annoying having to make wholesale changes to your previously-working code every so often
web2py's community is also first rate - I know the same applies to Django and to Python in general, but again it's a breath of fresh air compared to some others.
yeah, lets summarize all of it. for fun.
0. eve runs on stackless python. (server and client. using dx9, not ogl (those bastards!)) .net (web frameworks might also run there, who really knows? or cares?)
1. stackless is cpython without a stack, hence the name. (one core limitation is not stackless' fault)
2. ironpython is python on
3. jython is python on java (at least django runs on that one)
4. these are interpreters. if you dont like it, i have others. also, i have to dock my mackinaw now. ice, ice, baby.
5. ???
6. CALDARI!!!!!!
had to post on eve thread. my clone wanted me to do it.
On a scale of 7 to 9, and we only get 0.7 difference between worst to best. Essentially: "I cannot tell if they are different, it all looks the same to me."
What a piece of crap.
Great article. If anything I am surprised how close some of the others scored compared to web2py. In terms of power, usability, and documentation web2py is the new standard.
Must be nice to have nothing better to dlo.
What about bobo?
http://bobo.digicool.com/