jina.clients.request.asyncio

Module for async requests generator.

jina.clients.request.asyncio.request_generator(data, request_size=0, mode=<RequestType.INDEX: 0>, mime_type=None, queryset=None, data_type=<DataInputType.AUTO: 0>, **kwargs)[source]

An async :function:`request_generator`.

Parameters
  • data (Union[Document, Iterable[Union[~DocumentContentType, ~DocumentSourceType, Document, Tuple[~DocumentContentType, ~DocumentContentType], Tuple[~DocumentSourceType, ~DocumentSourceType]]], AsyncIterable[Union[~DocumentContentType, ~DocumentSourceType, Document, Tuple[~DocumentContentType, ~DocumentContentType], Tuple[~DocumentSourceType, ~DocumentSourceType]]]]) – the data to use in the request

  • request_size (int) – the request size for the client

  • mode (RequestType) – the request mode (index, search etc.)

  • mime_type (Optional[str]) – mime type

  • queryset (Union[QueryLang, QueryLangProto, Dict, Iterator[Union[QueryLang, QueryLangProto, Dict]], None]) – querylang set of queries

  • data_type (DataInputType) – if data is an iterator over self-contained document, i.e. DocumentSourceType; or an iterator over possible Document content (set to text, blob and buffer).

  • kwargs – additional key word arguments

Yield

request

Return type

AsyncIterator[Request]