def extend_api(route='', api=None, base_url=''):
 def decorator(extend_with):
  apply_to_api = (hug.API(api) if api else hug.api.from_object(extend_with))
  for extended_api in extend_with():
   apply_to_api.extend(extended_api, route, base_url)
  return extend_with
 return decorator

def extend_api ( route = '' , api = None , base_url = '' ) : def decorator ( extend_with ) : apply_to_api = ( hug . API ( api ) if api else hug . api . from_object ( extend_with ) ) for extended_api in extend_with ( ) : apply_to_api . extend ( extended_api , route , base_url ) return extend_with return decorator
extends the current api .