jina.serve.helper module#

jina.serve.helper.wrap_func(cls, func_lst, wrapper, **kwargs)[source]#

Wrapping a class method only once, inherited but not overridden method will not be wrapped again

Parameters:
  • cls – class

  • func_lst – function list to wrap

  • wrapper – the wrapper

  • kwargs – extra wrapper kwargs

jina.serve.helper.store_init_kwargs(func, taboo=None)[source]#

Mark the args and kwargs of __init__() later to be stored via save_config() in YAML :type func: Callable :param func: the function to decorate :type taboo: Optional[Set] :param taboo: class taboo set of parameters :rtype: Callable :return: the wrapped function