Skip to content

Instantly share code, notes, and snippets.

@jsj14
Created February 4, 2022 03:50
Show Gist options
  • Save jsj14/76ecbd6ea3e462dda507fdd22678a48d to your computer and use it in GitHub Desktop.
Save jsj14/76ecbd6ea3e462dda507fdd22678a48d to your computer and use it in GitHub Desktop.
from google.cloud import storage
storage_client = storage.Client(project='your-project-id')
def list_blobs(bucket_name):
"""Lists all the blobs in the bucket"""
blobs = storage_client.list_blobs(bucket_name)
for blob in blobs:
print(blob.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment