def setup_request_bound_data(config):
 def attach_bound_data(request):
  parent = getattr(request, 'parent', None)
  return (parent.bound_data if parent else {})
 config.add_request_method(attach_bound_data, name='bound_data', reify=True)

def setup_request_bound_data ( config ) : def attach_bound_data ( request ) : parent = getattr ( request , 'parent' , None ) return ( parent . bound_data if parent else { } ) config . add_request_method ( attach_bound_data , name = 'bound_data' , reify = True )
attach custom data on request object .