File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -55,3 +55,17 @@ def test_run_pubsub(test_url):
5555 _test_url = "https://m.ctrip.com/webapp/flight/schedule/detail.html"
5656 test_run_http (_test_url )
5757 test_run_pubsub (_test_url )
58+
59+
60+ """
61+ from google.cloud import storage
62+ client = storage.Client()
63+ # https://console.cloud.google.com/storage/browser/[bucket-id]/
64+ bucket = client.get_bucket('bucket-id-here')
65+ # Then do other things...
66+ blob = bucket.get_blob('remote/path/to/file.txt')
67+ print(blob.download_as_string())
68+ blob.upload_from_string('New contents!')
69+ blob2 = bucket.blob('remote/path/storage.txt')
70+ blob2.upload_from_filename(filename='/local/path.txt')
71+ """
Original file line number Diff line number Diff line change 11# Function dependencies
22requests == 2.21.0
3- google-cloud-pubsub == 0.40.0
3+ google-cloud-pubsub == 0.40.0
4+ google-cloud-storage == 1.15.0
5+ #google-cloud-bigtable==0.32.1
6+ #google-cloud-core==0.29.1
You can’t perform that action at this time.
0 commit comments