Open
Description
Problem:
The current Batch class (https://github.com/googleapis/python-storage/blob/v2.14.0/google/cloud/storage/batch.py#L145) does not provide a good way of getting the responses from the batch call.
- There is a private member variable
_responses
, but it is not exposed from any public API for straightforward usage. - There is a public function named
finish()
, which returns the responses. However, it is called in the__exit__()
, and without a hack (mentioned in [Task]: Update the minor version of google-cloud-storage library prior to Beam release. apache/beam#27326 (comment)), it is not really convenient to use.
Suggestion:
Add a simple public function to return _responses
. It can be as simple as
def get_responses(self):
return self._responses