jina.clients.helper module

Helper functions for clients in Jina.

jina.clients.helper.pprint_routes(resp, stack_limit=3)[source]

Pretty print routes with prettytable, fallback to print().

Parameters
  • resp (Response) – the Response object

  • stack_limit (int) – traceback limit

jina.clients.helper.callback_exec(response, on_done, on_error, on_always, continue_on_error, logger)[source]

Execute the callback with the response.

Parameters
  • response – the response

  • on_done (Callable) – the on_done callback

  • on_error (Callable) – the on_error callback

  • on_always (Callable) – the on_always callback

  • continue_on_error (bool) – whether to continue on error

  • logger (JinaLogger) – a logger instance

Return type

None