Python Web frameworks: Min or max?
If you prefer a framework that puts the minimum between you and the Web, then Web.py will be your best choice. On the other hand, if you like wizards guiding you along the way, then you may prefer Web2py. CubicWeb is an excellent choice if your data comes from disparate sources. If your website's structure is data driven, then have a look at Pyramid or Zope 2. In addition, Zope 2 and Django are solid all-around choices, both having stood the test of time.
But these are only general suggestions. It's not the case that any particular Python Web framework is at a significant disadvantage to the others. 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.
Naturally, the current discussion paints only an overview. For the finer details, follow the links in the table below and plunge into the individual reviews.
Python Web frameworks compared
|Python versions||Licensing||Documentation||Web servers|
|CubicWeb 3.12.5||Any 2.x Python back to 2.5||LGPL||Tutorials, online user guide, and administration guide, all available from the main Web page||Twisted Web server, usually run with Apache. WSGI support is in the works.|
|Django 1.3||Any 2.x Python version||BSD||Tutorial, reference guide, and how-to guides, arranged like an online book||Any Web server that supports WSGI or FastCGI|
|Pyramid 1.0||Python 2.4 through 2.7||BSD-like||User guide, tutorials, sample applications, and API reference||Any Web server that supports WSGI. Also includes its own Web server suitable for large-scale applications.|
|Web.py 0.35||Any 2.x Python back to 2.3||No restrictions, but includes the CherryPy Web server governed by the CherryPy license||Cookbook, API reference, and categorized code examples||Any Web server supporting CGI, FastCGI, SCGI, or WSGI|
|Web2py 1.95||Python 2.5 through 2.7||LGPL||Online book, example website, lots of online "quick examples"||Any Web server that supports Python|
|Zope 2.13||Depends on Zope 2 version, varying from Python 2.4 for Zope 2.11.x to Python 2.7 for Zope 2.13.x||Zope Public License||Online book includes API reference, management interface guide, templates reference, and more||Any Web server that supports Python. Also includes its own Web server suitable for production use.|
Python Web frameworks compared, continued
|CubicWeb 3.12.5||MySQL, PostgreSQL, SQLite, Microsoft SQL Server||Planned||Debug mode will display log messages on a console, show trace information, show generated SQL queries, and more||Yes||Yes, based on JQuery|
|Pyramid 1.0||Any Python ORM tool such as SQLAlchemy, MongoDB, and Cassandra||Yes, via the Python Beaker package; provides page-level database query and other caching||Yes; interactive debugger that runs in the browser provides detailed stack trace||Yes, via standard Python logging package||No, though Pyramid does provide convenience functions for JSON and Ajax|
|Web.py 0.35||MySQL, PostgreSQL, SQLite, Microsoft SQL Server, Oracle, Firebird||Some support for caching templates||Yes; debug mode will automatically load code changes and provide detailed error pages||No, but you can incorporate the Python logging system||Yes, via jsdef (used in the template language)|
|Zope 2.13||Zope Object Database (ZODB) and third-party ZODB emulators such as RelStorage||Yes; includes several built-in caching helpers||Yes; debug mode lets you run Zope while watching debugging and logging output||Yes; uses standard Python logging capability||None specific|
This article, "Pillars of Python: Six Python Web frameworks compared," was originally published at InfoWorld.com. Follow the latest developments in application development and Python at InfoWorld.com. For the latest developments in business technology news, follow InfoWorld.com on Twitter.
You may still be better off sticking with Win7 or Win8.1, given the wide range of ongoing Win10...
Early results look promising: the many-hours-long Win7 waits may be behind us
Now that we're down to the wire, many upgraders report that the installer hangs. If this happens to...
Here’s how to step out of the server closet and into a more robust (and possibly more rewarding) tech...
Boiling the ocean never works. But the right proof of concept can provide a key transformative example...
If old Python networking and web libraries aren't fast enough for you, these new additions break speed...
The DDoS attack against Dyn affected numerous websites, but the biggest victims are the enterprises...