Skip to content
Minimally useful URL routing for werkzeug
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
routezeug.py
setup.py

README.md

Routezeug

minimally useful routing for werkzeug

Example:

import routezeug
import werkzeug
import wsgiref.simple_server


def index(request):
    return werkzeug.Response('Index\n')

def photo(request, photo_id):
    return werkzeug.Response('Photo: %s\n' % photo_id)


application = routezeug.router(
    ('GET', '/',          index),
    ('*',   '/:photo_id', photo),
)

server = wsgiref.simple_server.make_server('', 8000, application)
server.serve_forever()

See also: Selector.

You can’t perform that action at this time.