Package tdi :: Package integration :: Module wtf_service :: Class Middleware
[frames] | no frames]

Class Middleware

source code

object --+
         |
        Middleware

Template middleware
Instance Methods
 
__init__(self, global_template, 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__

Properties

Inherited from object: __class__

Method Details

__init__(self, global_template, func)
(Constructor)

source code 
Initialization
Parameters:
  • global_template (GlobalTemplate) - The global template service
  • func (callable) - WSGI callable to wrap
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