Module selector
source code
selector - WSGI delegation based on URL path and method.
(See the docstring of selector.Selector.)
Copyright (C) 2006 Luke Arno - http://lukearno.com/
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Luke Arno can be found at http://lukearno.com/
|
method_not_allowed(environ,
start_response)
Respond with a 405 and appropriate Allow header. |
source code
|
|
|
not_found(environ,
start_response)
Respond with a 404. |
source code
|
|
|
expose(obj)
Set obj._exposed = True and return obj. |
source code
|
|
|
pliant(func)
Decorate an unbound wsgi callable taking args from wsgiorg.routing_args. |
source code
|
|
|
opliant(meth)
Decorate a bound wsgi callable taking args from wsgiorg.routing_args. |
source code
|
|
Imports:
re,
starmap,
shift_path_info,
resolve
Decorate an unbound wsgi callable taking args from wsgiorg.routing_args.
@pliant
def app(environ, start_response, arg1, arg2, foo='bar'):
...
|
Decorate a bound wsgi callable taking args from wsgiorg.routing_args.
class App(object):
@opliant
def __call__(self, environ, start_response, arg1, arg2, foo='bar'):
...
|