Middleware and libraries for WSGI

Flexible WSGI authentication and authorization tools.

Lighweight WSGI sessions middleware.

Beaker’s starts with the Perl Cache::Cache module, which was ported for use in Myghty. Beaker was then extracted from this code, and has been substantially rewritten and modernized since.

Deliverance is a tool to theme HTML, applying a consistent style to applications and static files regardless of how they are implemented, and separating site-wide styling from application-level templating.
hatom2atom provides Python tools for use with hAtom2Atom.xsl. Includes a test runner that uses html/atom file pairs to test for expected output and a WSGI app that acts as a proxy to transform hAtom documents into Atom (that you are looking at now).
Smooths over WSGI’s worst warts. In addition to calling start_response and returning an iterable, httpy lets you return a string, or return or raise a Response object.
A WSGI-enabled toolkit for creating RDF-driven web apps.
Roughly a framework, though more of a set of tools for frameworks. Provides Integration layers with other frameworks like CherryPaste, DjangoPaste and zope.paste.
Paste Deploy
Configuration system for WSGI applications, servers, and middleware; both to configure individual components and to compose those components into a single running system.
A layer of WSGI middleware that adds a velociraptor to every page served. Fact: every WSGI app is better with a raptor.
Repoze is an effort to bring Zope technologies to the larger Python web development community by breaking Zope up into pieces that fit into a WSGI deployment model. This effort also allows existing Zope users to make use of WSGI technologies for development and deployment purposes, notably including the ability to run Zope 2 and Plone applications under WSGI servers.
Provides integration between Schevo and WSGI apps.
This distribution provides WSGI middleware for “RESTful” mapping of URL paths to WSGI applications. Selector now also comes with components for environ based dispatch and on-the-fly middleware composition.
This distribution provides an easy way to include static content in your WSGI applications. There is a convenience method for serving files located via pkg_resources. There are also facilities for serving mixed (static and dynamic) content using “magic” file handlers. Python 2.4 string substitution and Kid template support are provided and it is easy to roll your own handlers. Note that this distribution does not require Python 2.4 or Kid unless you want to use those types of templates.
A web widget toolkit for Python to aid in the creation, packaging, and distribution of common view elements normally used in the Web. ToscaWidgets is an almost complete rewrite of TurboGears 1.0’s widgets in the spirit of TurboGears 2.0 philosophy of repackaging its services as independent WSGI components for easier maintenance and reuse in other Python web applications or frameworks.
Simple RESTful URL dispatcher that passes HTTP requests to an WSGI application based on a matching a URL path regex pattern and, optionally, the HTTP request method.
Werkzeug started as a simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility modules. It includes a powerful debugger, full featured request and response objects, HTTP utilities to handle entity tags, cache control headers, HTTP dates, cookie handling, file uploads, a powerful URL routing system and a bunch of community contributed addon modules.
Front-door dispatcher that directs HTTP requests based on “virtual host”. Includes tools to isolate WSGI apps from server deployment details.
WHIFF WSGI HTTP Integrated File System Frames
WHIFF reduces application complexity by providing an infrastructure for managing web application name spaces, a configuration template language for wiring named components into an application, and an applications programmer interface for accessing named components from Python and javascript modules.
Validates form submissions against the Akismet service to verify that they are not comment spam.
WSGI authentication middleware. Supports HTTP basic, digest, IP, HTML form, and OpenID-based authentication.
A simple framework for doing output-filtering of WSGI content. Works well with WSGIRemote.
WSGI middleware for validating and parsing HTML form submissions. Supports automatic escaping of HTML and data sterilization.
WSGI Intercept
Redirects Python HTTP calls to an in-process WSGI application. This can allow HTTP API calls (e.g., REST, XML-RPC, etc) without actually touching the network.
WSGI logging and event reporting middleware. Supports logging events in WSGI applications to STDOUT, time rotated log files, email, syslog, and web servers. Also supports catching and sending HTML-formatted exception tracebacks to a web browser for debugging.
Client library for doing RPC-style internal subrequests in a WSGI stack. Also works for doing HTTP RPC requests.
Middleware for URL rewriting, uses the same syntax as Apache’s mod_rewrite.
Object serialization middleware for WSGI. Supported object serialization formats include: XML-RPC, JSON, YaML, marshal, and pickle.
Session, HTTP cache control, and caching middleware for WSGI. Sessions are flup-compatible. Supports memory, filesystem, database, and memcached based backends.
WSGI middleware that provides an easy way to time all requests and report to statsd. Measurement key names are automatically generated.
Includes a simple WSGI application (wsgiAdaptor) that provides basic authentication, signed cookies and persistent sessions.
Turns any TurboGears/Buffet template plug-ins into WSGI middleware.

WSGI without the WSGI. Provides middleware for WSGI-enabling Python callables including:

  • Middleware that makes non-WSGI Python functions, callable classes, or methods into WSGI applications
  • Middleware that automatically handles generating WSGI-compliant HTTP response codes, headers, and compliant iterators
  • An HTTP response generator
  • A secondary WSGI dispatcher
This distribution provides Yet Another Request Object (for WSGI) in a way that is intended to be simple and useful for web developers who don’t want to have to know a lot about WSGI to get the job done. It’s also a handy convenience for those who do like to get under the hood but would be happy to eliminate some boilerplate without the encumbrance of some all-singing-all-dancing framework.



AuthKit is an authentication and authorization toolkit for WSGI applications and frameworks.

The authentication middleware part is essentially an extension of paste.auth and there is an adaptor module providing support for Pylons although it works with all WSGI apps.

This distribution provides code reloading middleware for use with your WSGI applications. Upon recieving each request, it forgets everything that it has imported since the last request so that it is imported all over again. The concept was inspired by the RollBackImporter used by Steve Purcell in PyUnit
webstring is a template engine for programmers whose favorite template language is Python. webstring can be used to generate any text format from a template with the additional advantage of advanced XML and HTML templating using the lxml and cElementTree libraries.
Application-neutral macro templating language. Seems to be superseded by Deliverance.
WSGI middleware modules for XML processing