===============
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 <http://www.sqlalchemy.org/>`_
    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 <http://elixir.ematia.de/>`_
    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 <https://storm.canonical.com/>`_
    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 <http://genshi.edgewall.org/>`_
    If you like XML template engines, check out Genshi.  Ass-kicking
    template engine, but unfortunately not the fastest.

`Mako <http://www.makotemplates.org/>`_
    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 <http://jinja.pocoo.org/>`_
    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 <http://dev.simplecodes.com/projects/wtforms>`_
    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 <http://code.google.com/p/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 <http://formencode.org/>`_
    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 <http://subdivi.de/~helmut/wsgitools/>`_
    Various small WSGI utilities like a minimal traceback or auth
    middleware.  It also includes an SCGI server.

`Paste <http://pythonpaste.org/>`_
    Many tools for use with WSGI: dispatching, composition, simple
    applications (e.g., file serving), and more.

`Routes <http://routes.groovie.org/>`_
    A port of the Rails URL mapping system.

`Python OpenID <http://openidenabled.com/python-openid/>`_
    The OpenID library with batteries included.

`AuthKit <http://authkit.org/>`_
    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.


.. _wsgi.org: http://wsgi.org/wsgi/Middleware_and_Utilities
