def _pecan_generator_wrapper(func, *args, **kwargs):
 kwargs.setdefault('content_type', 'application/json')
 kwargs.setdefault('template', 'json')
 return _composed(_protect_original_resources, db_api.retry_db_errors, func(*args, **kwargs))

def _pecan_generator_wrapper ( func , * args , ** kwargs ) : kwargs . setdefault ( 'content_type' , 'application/json' ) kwargs . setdefault ( 'template' , 'json' ) return _composed ( _protect_original_resources , db_api . retry_db_errors , func ( * args , ** kwargs ) )
helper function so we dont have to specify json for everything .