Class Batch (2.13.0)

Batch(client, raise_exception=True)

Proxy an underlying connection, batching up change operations.

Parameters

NameDescription
client Client

The client to use for making connections.

raise_exception bool

(Optional) Defaults to True. If True, instead of adding exceptions to the list of return responses, the final exception will be raised. Note that exceptions are unwrapped after all operations are complete in success or failure, and only the last exception is raised.

Methods

current

current()

Return the topmost batch, or None.

finish

finish(raise_exception=True)

Submit a single multipart/mixed request with deferred requests.

Parameter
NameDescription
raise_exception bool

(Optional) Defaults to True. If True, instead of adding exceptions to the list of return responses, the final exception will be raised. Note that exceptions are unwrapped after all operations are complete in success or failure, and only the last exception is raised.

Returns
TypeDescription
list of tuplesone (headers, payload) tuple per deferred request.