Class BatchCheckout (3.42.0)

BatchCheckout(database, request_options=None)

Context manager for using a batch from a database.

Inside the context manager, checks out a session from the database, creates a batch from it, making the batch available.

Caller must not use the batch to perform API requests outside the scope of the context manager.


database Database

database to use

request_options RequestOptions

(Optional) Common options for the commit request. If a dict is provided, it must be of the same form as the protobuf message RequestOptions.




Begin with block.


__exit__(exc_type, exc_val, exc_tb)

End with block.