Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    urlrelay 0.7.1

    Download button

    No screenshots available
    Downloads: 392  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    L. C. Rees | More programs
    BSD License / FREE
    January 15th, 2009, 09:44 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    urlrelay description

    RESTful WSGI URL dispatcher.

    urlrelay is a simple URL dispatcher that passes HTTP requests to a WSGI application based on a matching URL path regex pattern and an optional HTTP request method.

    Usage example:

    #!/bin/env python

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


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    URL dispatcher | HTTP request parser | regex pattern | Python | WSGI | URL

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM