def make_api_method(func):
 @functools.wraps(func)
 def wrapper(*args, **kwargs):
  args[0]._extra_params = kwargs.pop('extra_params', None)
  result = func(*args, **kwargs)
  try:
   del args[0]._extra_params
  except AttributeError:
   pass
  return result
 return wrapper

def make_api_method ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwargs ) : args [ 0 ] . _extra_params = kwargs . pop ( 'extra_params' , None ) result = func ( * args , ** kwargs ) try : del args [ 0 ] . _extra_params except AttributeError : pass return result return wrapper
provides a single entry point for modifying all api methods .