|
Project Information
Featured
Downloads
Links
|
WSGIServletsWhat 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 worksWSGIServlets 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. TutorialA 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
./runtutorialDocumentationFull API documentation is included in the source tarball. It's also hosted here: http://packages.python.org/WSGIServlets/ |