Stupid simple API reference for bottle.py web services

I have a stupid json-only REST API I implemented in bottle.py. This introspects the default app, gives a dumb readout that should act as an adequate reference for discovery:

@bottle.route('/')
def index():
    bottle.response.content_type = 'text/plain'
    return ("=== API REFERENCE ===\n" +
            "\n".join(x['rule'] for x in
                      bottle.app().routes))

Using Pylons

Just for giggles, this new web app I’m working on is in Pylons. So much of it is dependent on configuration (the paster creation script installs all kinds of code all over the project directory). I think I’m impatient enough at this point of my life that I actually prefer the shrink-wrapped bumper lanes of Django to this approach.