Resources for Python Web Programming

Date February 9, 2008

Python has received a lot of attention from web developers during the last years, most due to the appearance of new frameworks that often drastically improve developer productivity.
I’ve compiled a list of useful resources for web developers getting started with Python web programming. The list also includes the frameworks I consider the most useful for Python web developers. Enjoy the lists.

General stuff

WSGI. WSGI stands for Web Server Gateway Interface and is a Python standard for the communication between web servers and web applications. It’s supported by several Python web frameworks.

Paste. A set of WSGI tools.

CGI scripts with Python. Sometimes a simple CGI script will do.

Database interaction

Python supports interfaces to all common databases including the open source databases MySQL and PostgreSQL. As almost all web application also use a relational database, I’ve included the most important resources for Python and database interaction.

Pytohn Database API Specification 2.0. If you want to do the low level stuff yourself, you should learn the Python Database API Specification 2.0. Almost all libraries that interact with a specific database support this API.

Supported Databases. Here you will find a list of supported database systems.

SQLAlchemy. SQLAlchemy is IMHO by far the best database library for Python developers. It includes a powerful OR Mapper and many other goodies. It is also supported by several of the web frameworks mentioned below. If you’re using Python for any serious database interaction, you will love SQLAlchemy.

SQLObject. SQLObject is another popular OR Mapper for Python. I prefer SQLAlchemy but SQLObject is also a wonderful piece of software and definitely worth checking out. The next Version is called SQLObject 2.

Web frameworks

Webware for Python. Webware has been around for quite some time. It’s somewhat similar to Java Servlets and Java Server Pages. Although a good framework, it never really god a popular as the following frameworks.

TurboGears. TurboGears is a popular and powerful framework, building on the foundation of other tools like SQLObject, CherryPy and others. Future versions will also support SQLAlchemy. To stay up to data about what’s going on, follow Planet TurboGears

Django. Django is another very popular and powerful web framework. Together with TurboGears it’s the most popular framework among Python fans. Definitely worth checking out. Also have a look at the free Django Book.

Pylons. Pylons is another wonderful framework worth a closer look. It allows you to use your favorite Python libraries. You can choose among several OR mappers including SQLAlchemy, many templating systems and AJAX libraries.

web2py. Another new and interesting framework.

Comparisons

I’ve also included some comparisons of the above mentioned frameworks either with each other or with Ruby on Rails. The comparisons are sometimes already two years old which is quite a lot in the software world, but they may still give you an overview about the difference between the various frameworks.

Django vs. TurboGears. A comparison between Django and TurboGears.

Performance comparison. Performance comparison between Django, Ruby on Rails and PHP’s Symfony.

Rails vs. Django. A Rails vs. Django comparison in various formats.

TurboGears vs. Rails. A balanced, but somewhat dated comparison between Rails and TurboGears.

Useful Blogs and Python sites

Ian Bicking. Ian Bicking is a very active member of the Python community, involved with several Python projects like SQLObject, Paste and more. His blog contains many useful articles and is always a pleasure to read.

The Daily Python URL. A site with many useful current information about Python updated almost daily.

I hope that list was helpful. If you think there is anything missing, please leave a comment.

6 Responses to “Resources for Python Web Programming”

  1. Holger Froebe said:

    Suffering from Zope/Plone blindness?

    This combo has by far the most installations in the Python/WebFramework-Area + a vibrant community (http://www.plone.org).

    Its a mature framework - used by Novell, Disney, Akamai, “Die Zeit” (for a german example), Technical University Munique … -> see also http://www.plone.net/sites for a more detailed overview.

    So my choice for the “most popular web framework in python-land”-category DEFINITELY would be Plone.

  2. Markus Jais said:

    @Holger: Plone is a content management system and not a framework.
    I agree that Zope and Plone are powerful. But especially Zope is also a complicated beast and can be very intimidating, especially for beginners.

    I admit that I’ve never liked Zope. For some applications it’s the best choice but I’ve always seen it as somethink like Python’s J2EE.

    For most web apps, something like Django or TurboGears makes much more sense in the Python world.

  3. max said:

    I would appreciate if you could add http://www.web2py.com to your list. It is new but it rocks and it is easier, faster and more feature packed then the competitors. Here are some free web2py appliances: http://mdp.cti.depaul.edu/appliances

  4. Markus Jais said:

    @Max: I’ve added your comment and web2py to the list above. Sorry for the delay but my wordpress configuration blogs all comments with more than one link as I get a lot of spam. So I had to manually approve your comment.

    Thanks for posting it. web2py defintely looks interesting.

  5. Max said:

    Thanks. I appreciate it.

  6. Alan Dewell said:

    A nice Django, RoR, Seam (3 major web frameworks) comparison focusing on source code:
    http://www.mininglabs.com/2008/05/13/web-frameworks-a-free-software-oriented-study/

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>