Ich kann keine Beispiele finden, wie die Batch-Funktionalität des Python Google Cloud Storage verwendet wird. Ich sehe es existiert here.Batch-Anfrage mit Google Cloud Storage Python-Client
Ich würde ein konkretes Beispiel lieben. Nehmen wir an, ich möchte eine Reihe von Blobs mit einem bestimmten Präfix löschen. Ich würde beginnen die Liste der Blobs immer wie folgt
from google.cloud import storage
storage_client = storage.Client()
bucket = storage_client.get_bucket('my_bucket_name')
blobs_to_delete = bucket.list_blobs(prefix="my/prefix/here")
# how do I delete the blobs in blobs_to_delete in a single batch?
# bonus: if I have more than 100 blobs to delete, handle the limitation
# that a batch can only handle 100 operations