The client is responsible for receiving tasks (sets of parameters) from the main node, rendering these tasks, performing inference, and then returning the results to the main node for inference.

Users should not have to modify or even view this file in order to use and extend 3DB.

threedb.client.send_array(sock: zmq.sugar.socket.Socket, arr: Any, dtype: Optional[str] = None, flags: int = 0, copy: bool = True, track: bool = False)

send a numpy array with metadata

threedb.client.query(sock: zmq.sugar.socket.Socket, kind: str, worker_id: str, result_data: Optional[Dict[str, Any]] = None, result_dtypes: Optional[Dict[str, str]] = None, **kwargs)Dict[str, Any]

Send a request back to the server and receive a response. Additional named arguments are forwarded to the server as-is as part of the request.

  • sock (zmq.Socket) – An open socket connected to the same port as the server.

  • kind (str) – What kind of request to send ('info', 'push', 'pull', or 'decl')

  • worker_id (str) – The id of the client sending the request

  • result_data (Optional[Dict[str, Any]], optional) – If kind == 'push', this should be a dictionary of results to send back to the server (otherwise ignored), by default None.


The response from the server for to the sent message; see here for documentation of the communication protocol,

Return type

Dict[str, Any]