This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple RESTful WSGI URL dispatcher.

Project Description

Simple URL dispatcher that passes HTTP requests to a WSGI application based on a matching regular expression and an optional HTTP request method.

Usage example:

import urlrelay

# Simple URL to application mapping
@urlrelay.url('^/$')
def index(environ, start_response):
   start_response('200 OK', [('Content-type', 'text/plain')])
   return ['Home Page']

# "RESTful" URL to application mapping
@urlrelay.url('^/hello_world$', 'GET')
def hello_world(environ, start_response):
    start_response('200 OK', [('Content-type', 'text/plain')])
    return ['Hello World']

# URL to on-disk application mapping
 urlrelay.register('^/ondisk$', 'module.on_disk')

if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    http = make_server('', 8080, urlrelay.URLRelay())
    http.serve_forever()
Release History

Release History

This version
History Node

0.7.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
urlrelay-0.7.1-py2.5.egg (24.8 kB) Copy SHA256 Checksum SHA256 2.5 Egg Jan 15, 2009
urlrelay-0.7.1.tar.bz2 (10.5 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2009
urlrelay-0.7.1.tar.gz (10.4 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2009
urlrelay-0.7.1.win32.exe (74.9 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jan 15, 2009
urlrelay-0.7.1.zip (15.0 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting