Werkzeug

The Swiss Army Knife For Python Web Developers

Other Libraries

Because Werkzeug is just a thin layer over WSGI, it’s very easy to use WSGI middlewares together with Werkzeug-powered applications. It’s also possible to just use small parts of Werkzeug like the URL mapper etc. with complete different implementations or frameworks.

Here a small list of libraries you may want to try out.

Database Layers

If you want to use relational databases in your application.

SQLAlchemy
SQLAlchemy is a great database layer and object relational mapper that lets you construct SQL queries using Python expressions. It also provides connection pools and plays nicely with the WSGI standard.
Elixir
Elixir is a declarative layer on top of the SQLAlchemy library. It is a fairly thin wrapper, which provides the ability to create simple Python classes that map directly to relational database tables (this pattern is often referred to as the Active Record design pattern), providing many of the benefits of traditional databases without losing the convenience of Python objects.
Storm
Storm is an object-relational mapper (ORM) for Python developed at Canonical. It has been in development for more than a year for use in Canonical projects such as Launchpad, and has been released as an open-source product.

Template Engines

Bigger applications deserve something better than minitmpl :)

Genshi
If you like XML template engines, check out Genshi. Ass-kicking template engine, but unfortunately not the fastest.
Mako
The fastest designer friendly template engine for Python. Similar to ERB http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/ in terms of syntax, but with a powerful template inheritance system and multiple namespaces.
Jinja
Sandboxed, Django-/Smarty-like template engine, but with inline expressions that let you execute a subset of Python expressions in your templates.

Form Validation

Here some form validation packages for WSGI applications:

What The Forms
WTForms is a HTTP/HTML forms handling library, written in Python. It handles definition, validation and rendering in a flexible and i18n friendly way. It heavily reduces boilerplate and is completely unicode aware.
Newforms Extracted
This is a project to extract Django’s newforms and make that package usable by other projects, since Django doesn’t seem interested in making this code framework independent.
FormEncode
FormEncode is a validation and form generation package. The validation can be used separately from the form generation. The validation works on compound data structures, with all parts being nestable. It is separate from HTTP or any other input mechanism.

Tools and Utilities

Something’s missing? Check here first:

wsgitools
Various small WSGI utilities like a minimal traceback or auth middleware. It also includes an SCGI server.
Paste
Many tools for use with WSGI: dispatching, composition, simple applications (e.g., file serving), and more.
Routes
A port of the Rails URL mapping system.
Python OpenID
The OpenID library with batteries included.
AuthKit
WSGI Authentication and Authorization Tools. Built in support for HTTP basic, HTTP digest, form, cookie and OpenID authentication methods plus others.

You can find a more complete list on the wsgi.org webpage.