Python API#

This section includes the API documentation from the jina codebase, as extracted from the docstrings in the code.

For further details, please refer to the full user guide.

jina.orchestrate.flow - Flow#

base.Flow

Flow is how Jina streamlines and distributes Executors.

asyncio.AsyncFlow

Asynchronous version of jina.Flow.

jina.serve.executors - Executor#

BaseExecutor

The base class of all Executors, can be used to build encoder, indexer, etc.

decorators.requests

@requests defines the endpoints of an Executor.

decorators.monitor

Decorator and context manager that allows monitoring of an Executor.

jina.clients - Clients#

Client

Convenience function that returns client instance for given protocol.

grpc.GRPCClient

A client connecting to a Gateway using gRPC protocol.

grpc.AsyncGRPCClient

Asynchronous client connecting to a Gateway using gRPC protocol.

http.HTTPClient

A client connecting to a Gateway using gRPC protocol.

http.AsyncHTTPClient

Asynchronous client connecting to a Gateway using HTTP protocol.

websocket.WebSocketClient

A client connecting to a Gateway using WebSocket protocol.

websocket.AsyncWebSocketClient

Asynchronous client connecting to a Gateway using WebSocket protocol.

jina.types.request - Networking messages#

Request

Request is one of the primitive data types in Jina, and serves as a base for DataRequest and Response.

data.DataRequest

Represents a DataRequest used for exchanging docarray.DocumentArray with and within a Flow.

data.Response

Response is the Request object returned by the flow.

status.StatusMessage

Represents a Status message used for health check of the Flow

jina.serve.runtimes - Flow internals#

asyncio.AsyncNewLoopRuntime

The async runtime to start a new event loop.

gateway.GatewayRuntime

The Gateway Runtime that starts a gateway pod.

worker.WorkerRuntime

Runtime procedure leveraging Grpclet for sending DataRequests

head.HeadRuntime

Runtime is used in head pods.