I have a requirement where I need to delete millions of objects from a folder in a GCS bucket.
This is my current implementation.
bucket = self.storage_client.bucket(bucket_name) blobs = bucket.list_blobs(prefix=folder_name) for blob in blobs: blob.delete()
As the number of objects is more, listing is not the right way. Need to find a way to do some multi-threading approach.