Metadata-Version: 1.0
Name: urlrelay
Version: 0.7.1
Summary: RESTful WSGI URL dispatcher.
Home-page: UNKNOWN
Author: L. C. Rees
Author-email: lcrees@gmail.com
License: BSD
Description: 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()
Keywords: WSGI URL dispatch relay route middleware web HTTP
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
