Tuesday, September 16, 2008

Colubrid

The Colubrid looks like a very promising Python WSGI publishing system. Here is the hello world taken from the examples directory in the source code:

from colubrid import BaseApplication, Request, HttpResponse

class HelloWorld(BaseApplication):
def __init__(self, environ, start_response):
super(HelloWorld, self).__init__(environ, start_response)
self.request = Request(environ, start_response)

def process_request(self):
return HttpResponse('Hello World')

app = HelloWorld
if __name__ == '__main__':
from colubrid import execute
execute()
Thats it, nice and simple. It is ideally suited for simply exposing controllers to the web. Without any excess features. Although, I'm not too sure what the future plans for Colubrid are if any.

No comments :

Post a Comment