Skip to content

Commit 577026e

Browse files
committed
learning gcs
1 parent a16ead3 commit 577026e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

gcs/gcs-test.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Imports the Google Cloud client library
2+
from google.cloud import storage
3+
4+
# Instantiates a client
5+
storage_client = storage.Client(project="plucky-agency-315021")
6+
7+
for bucket in storage_client.list_buckets():
8+
print(bucket)
9+
10+
mybucket = storage_client.get_bucket("my-wikipedia-tutorial")
11+
print(mybucket.path)
12+
myblobs = mybucket.list_blobs()
13+
for blob in myblobs:
14+
print(blob.path)
15+

0 commit comments

Comments
 (0)