Package wtf :: Package app :: Package services :: Module static :: Class Middleware
[hide private]
[frames] | no frames]

Class Middleware

source code

object --+
         |
        Middleware

Static middleware - provides response.sendfile
Instance Methods [hide private]
 
__init__(self, svc, x_sendfile, func)
Initialization
source code
iterable
__call__(self, environ, start_response)
Middleware handler
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
ResponseFactory _factory
Response factory
callable _func
Next WSGI handler
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, svc, x_sendfile, func)
(Constructor)

source code 
Initialization
Parameters:
  • svc (StaticService) - The static service instance
  • x_sendfile (str) - X-Sendfile-Header name or None
  • func (callable) - Next WSGI handler
Overrides: object.__init__

__call__(self, environ, start_response)
(Call operator)

source code 
Middleware handler
Parameters:
  • environ (dict) - WSGI environment
  • start_response (callable) - Start response callable
Returns: iterable
WSGI response iterable