def route(obj):
 classname = obj.__class__.__name__
 log.info('Checking %s for webhooks', classname)
 for (name, func) in getmembers(obj, ismethod):
  if getattr(func, '_err_webhook_uri_rule', False):
   log.info('Webhook routing %s', func.__name__)
   for verb in func._err_webhook_methods:
    wv = WebView(func, func._err_webhook_form_param, func._err_webhook_raw)
    bottle_app.route(func._err_webhook_uri_rule, verb, callback=wv, name=((func.__name__ + '_') + verb))

def route ( obj ) : classname = obj . __class__ . __name__ log . info ( 'Checking %s for webhooks' , classname ) for ( name , func ) in getmembers ( obj , ismethod ) : if getattr ( func , '_err_webhook_uri_rule' , False ) : log . info ( 'Webhook routing %s' , func . __name__ ) for verb in func . _err_webhook_methods : wv = WebView ( func , func . _err_webhook_form_param , func . _err_webhook_raw ) bottle_app . route ( func . _err_webhook_uri_rule , verb , callback = wv , name = ( ( func . __name__ + '_' ) + verb ) )
decorator marking the decorated method as being a handler for requests .