def list_blobs_with_prefix(bucket_name, prefix, delimiter=None):
 storage_client = storage.Client()
 bucket = storage_client.get_bucket(bucket_name)
 blobs = bucket.list_blobs(prefix=prefix, delimiter=delimiter)
 print 'Blobs:'
 for blob in blobs:
  print blob.name
 if delimiter:
  print 'Prefixes:'
  for prefix in blobs.prefixes:
   print prefix

def list_blobs_with_prefix ( bucket_name , prefix , delimiter = None ) : storage_client = storage . Client ( ) bucket = storage_client . get_bucket ( bucket_name ) blobs = bucket . list_blobs ( prefix = prefix , delimiter = delimiter ) print 'Blobs:' for blob in blobs : print blob . name if delimiter : print 'Prefixes:' for prefix in blobs . prefixes : print prefix
lists all the blobs in the bucket that begin with the prefix .