You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: google/cloud/storage/batch.py
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,21 @@
13
13
# limitations under the License.
14
14
"""Batch updates / deletes of storage buckets / blobs.
15
15
16
-
See https://cloud.google.com/storage/docs/json_api/v1/how-tos/batch
16
+
A batch request is a single standard HTTP request containing multiple Cloud Storage JSON API calls.
17
+
Within this main HTTP request, there are multiple parts which each contain a nested HTTP request.
18
+
The body of each part is itself a complete HTTP request, with its own verb, URL, headers, and body.
19
+
20
+
Note that Cloud Storage does not support batch operations for uploading or downloading.
21
+
Additionally, the current batch design does not support library methods whose return values
22
+
depend on the response payload. See more details in the [Sending Batch Requests official guide](https://cloud.google.com/storage/docs/batch).
23
+
24
+
Examples of situations when you might want to use the Batch module:
25
+
``blob.patch()``
26
+
``blob.update()``
27
+
``blob.delete()``
28
+
``bucket.delete_blob()``
29
+
``bucket.patch()``
30
+
``bucket.update()``
17
31
"""
18
32
fromemail.encodersimportencode_noop
19
33
fromemail.generatorimportGenerator
@@ -131,6 +145,12 @@ def content(self):
131
145
classBatch(Connection):
132
146
"""Proxy an underlying connection, batching up change operations.
133
147
148
+
.. warning::
149
+
150
+
Cloud Storage does not support batch operations for uploading or downloading.
151
+
Additionally, the current batch design does not support library methods whose
Copy file name to clipboardExpand all lines: samples/snippets/storage_batch_request.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,14 @@
28
28
29
29
30
30
defbatch_request(bucket_name, prefix=None):
31
-
"""Use a batch request to patch a list of objects with the given prefix in a bucket."""
31
+
"""
32
+
Use a batch request to patch a list of objects with the given prefix in a bucket.
33
+
34
+
Note that Cloud Storage does not support batch operations for uploading or downloading.
35
+
Additionally, the current batch design does not support library methods whose return values
36
+
depend on the response payload.
37
+
See https://cloud.google.com/python/docs/reference/storage/latest/google.cloud.storage.batch
0 commit comments