Skip to main content

The Swiss Army knife of Python web development

Project description

werkzeug

Werkzeug is the Swiss Army(r) knife of Python web development.

It provides useful classes and functions for any WSGI application take make life much easier. All of the provided classes are independed from each other so you can mix it with any other library.

Builtin blades^Wfeatures

Request / Response objects

These objects wrap the WSGI environ and start_response objects. They handle unicode conversion, form data parsing, cookie management and much more in a django like manner.

Just subclass them and hook your own features in.

Reporter stream

A class that can wrap a wsgi.input stream so that it reports it’s progress into the active session, a file on the filesystem etc. This is very useful if you want to give your users a visual feedback for file uploads using AJAX.

Application debugger middleware

If you want to debug your WSGI application you can hook in the DebuggedApplication middleware that allows you to inspect the frames of tracebacks either by looking at the current locals and sourcecode or starting an interactive shell in one of the frames.

Shared data middleware

In production environments static data is usually served by a lightweight webserver like lighttpd or nginx. But during development it makes no sense to install another service on the computer so the SharedDataMiddleware can serve static files in your WSGI application.

Unicode aware data processing

The utils package contains functions that work like their counterparts in the builtin urllib or cgi module but are unicode aware. Per default they expect utf-8 strings like the request/response objects but you can pass an encoding to the too.

Mini template engine

For small projects you often face the problem that a real template engine means another requirement but the builtin string formattings (or string template) operations are not enough for the application. Werkzeug provides a minimal template engine that looks and behaves like the e-ruby template engine.

Context Locals

The Local object works pretty much like a normal thread local but it has support for py.magic greenlets too. Additionally there is a LocalManager that allows you to clean up all the context locals you have instanciated.

Test utilities

Werkzeug provides a Client class that can be used to test applications. Just instanciate it with the app and fire virtual requests.

copyright:

2007 by Armin Ronacher.

license:

BSD, see LICENSE for more details.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Werkzeug-0.1.tar.gz (74.5 kB view hashes)

Uploaded Source

Built Distributions

Werkzeug-0.1-py2.5.egg (177.9 kB view hashes)

Uploaded Source

Werkzeug-0.1-py2.4.egg (179.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page