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
objectstack_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 callbackon_error (
Callable
) – the on_error callbackon_always (
Callable
) – the on_always callbackcontinue_on_error (
bool
) – whether to continue on errorlogger (JinaLogger) – a logger instance
Return type
None