Centipede is a collection of WSGI middleware with a simple decorator based router. It's strength is that it models the technology in use and tries not to confuse developers with complex patterns and tricks.
Either unpack you downloaded .zipfile, or clone the mercurial repository:
$ hg clone https://centipede.googlecode.com/hg/ projectname $ cd projectname $ python bootstrap.py --no-site-packages . $ source bin/activate $ ./run install $ ./run $ chromium-browser http://localhost:8080
To disable the virtual environment:
It's pretty much just to make a function and expose it to some url using the @expose decorator.
@expose('^/someurl$','GET', content_type='text/plain') def index(request, response): """ Some url that returns a bit of text """ return 'someurl have been reached' from framework import template @expose('^/$','GET') def index(request, response): """ Return the index template """ return template('index.html', params=request.params)
Centipede is a nano web framework.
It's main purpose is to provide a really simple, clean and detached way to expose a rest service to the web. Be it an API, an application or just a few html pages.
Check out the controllers article to see how.