jina.clients.base package#

Submodules#

Module contents#

Module containing the Base Client for Jina.

class jina.clients.base.BaseClient(args=None, **kwargs)[source]#

Bases: InstrumentationMixin, ABC

A base client for connecting to the Flow Gateway.

Parameters:
  • args (Optional[Namespace]) – the Namespace from argparse

  • kwargs – additional parameters that can be accepted by client parser

static check_input(inputs=None, **kwargs)[source]#

Validate the inputs and print the first request if success.

Parameters:
  • inputs (Optional[InputType]) – the inputs

  • kwargs – keyword arguments

Return type:

None

property inputs: InputType#

An iterator of bytes, each element represents a Document’s raw content.

inputs defined in the protobuf

Return type:

InputType

Returns:

inputs

aio_tracing_client_interceptors()#

Create a gRPC client aio channel interceptor. :rtype: Optional[Sequence[ClientInterceptor]] :returns: An invocation-side list of aio interceptor objects.

aio_tracing_server_interceptors()#

Create a gRPC aio server interceptor. :rtype: Optional[Sequence[ServerInterceptor]] :returns: A service-side aio interceptor object.

tracing_client_interceptor()#
Return type:

Optional[OpenTelemetryClientInterceptor]

Returns:

a gRPC client interceptor with the global tracing provider.

property client: T#

Return the client object itself

Return type:

TypeVar(T)

Returns:

the Client object