0
谷歌雲存儲在谷歌雲殼quickstart.py的作品,但不是在谷歌應用程序引擎爲什麼谷歌雲存儲在谷歌雲外殼,但沒有對谷歌應用程序引擎quickstart.py作品?
quickstart.py
def run_quickstart():
# [START storage_quickstart]
# Imports the Google Cloud client library
from google.cloud import storage
# Instantiates a client
storage_client = storage.Client()
bucket_name = 'mygoolgeappproject.appspot.com'
bucket = storage_client.get_bucket(bucket_name)
blobs = bucket.list_blobs()`enter code here`
for blob in blobs:
print(blob.name)
# The name for the new bucket
#bucket_name = 'mygoolgeappproject.appspot.com'
# Creates the new bucket
#bucket = storage_client.create_bucket(bucket_name)
#print('Bucket {} created.'.format(bucket.name))
# [END storage_quickstart]
if __name__ == '__main__':
run_quickstart()