My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

WSGIServlets

What is it?

WSGIServlets is a lightweight web application framework written in python for python's WSGI specification. See PEP 3333 for details about WSGI.

It's a small, elegant framework that does not get in your way. Here's a Hello, World! example:

from wsgiservlets import *

class helloworld(HTMLPage):

    def write_content(self):

        self.writeln("Hello, World!")

How it works

WSGIServlets is a class hierarchy. The base class, WSGIServlet, is an abstract base class providing the package's core functionality. Instances of subclasses of WSGIServlet (servlets) are WSGI applications: servlets are callable and adhere to the PEP 333 protocol. HTMLPage (from the above example) is a subclass of WSGIServlet and has many, many features that make processing incoming requests and forms as well as generating output a simple, intuitive process.

Tutorial

A live tutorial can be found here.

The package comes with a complete tutorial written in WSGIServlets. Download the tarball, unpack it, and from the root directory of the distribution:

    cd tutorial
    ./runtutorial

Documentation

Full API documentation is included in the source tarball. It's also hosted here: http://packages.python.org/WSGIServlets/

Powered by Google Project Hosting