Centipede

Centipede is a nano web framework.

  • Language: Python
  • Released: Jan 25, 2011
    Last Update: Jan 25, 2011

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.

It makes use of webobvirtualenvurlrelay and mako.

enjoy.

Hide

Installation

Prerequisites:

Installation:

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:

$ deactivate

enjoy.

Hide

Controllers

Have a look at controllers.py & framework.py.

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)
Hide

Usage

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.

You need to log-in or create an account
  • Create an account
  • Log-in
Please use your real name.
Activation link will be sent to this address.
Minimum 8 characters
Enter your password again

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

License » GNU GPL Download
or Get a quote

for customization or integration services

Post a comment

Or enter your name and Email
No comments have been posted yet.