Skip to content

Commit 9a189da

Browse files
authored
chore: Add region tags for Transfer Manager samples (#1110)
1 parent 6febcb1 commit 9a189da

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

samples/snippets/storage_transfer_manager_download_all_blobs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START storage_transfer_manager_download_all_blobs]
1616
def download_all_blobs_with_transfer_manager(
1717
bucket_name, destination_directory="", processes=8
1818
):
@@ -62,3 +62,4 @@ def download_all_blobs_with_transfer_manager(
6262
print("Failed to download {} due to exception: {}".format(name, result))
6363
else:
6464
print("Downloaded {} to {}.".format(name, destination_directory + name))
65+
# [END storage_transfer_manager_download_all_blobs]

samples/snippets/storage_transfer_manager_download_chunks_concurrently.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START storage_transfer_manager_download_chunks_concurrently]
1616
def download_chunks_concurrently(bucket_name, blob_name, filename, processes=8):
1717
"""Download a single file in chunks, concurrently."""
1818

@@ -40,3 +40,4 @@ def download_chunks_concurrently(bucket_name, blob_name, filename, processes=8):
4040
transfer_manager.download_chunks_concurrently(blob, filename, max_workers=processes)
4141

4242
print("Downloaded {} to {}.".format(blob_name, filename))
43+
# [END storage_transfer_manager_download_chunks_concurrently]

samples/snippets/storage_transfer_manager_upload_directory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START storage_transfer_manager_upload_directory]
1616
def upload_directory_with_transfer_manager(bucket_name, source_directory, processes=8):
1717
"""Upload every file in a directory, including all files in subdirectories.
1818
@@ -76,3 +76,4 @@ def upload_directory_with_transfer_manager(bucket_name, source_directory, proces
7676
print("Failed to upload {} due to exception: {}".format(name, result))
7777
else:
7878
print("Uploaded {} to {}.".format(name, bucket.name))
79+
# [END storage_transfer_manager_upload_directory]

samples/snippets/storage_transfer_manager_upload_many_blobs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START storage_transfer_manager_upload_many_blobs]
1616
def upload_many_blobs_with_transfer_manager(
1717
bucket_name, filenames, source_directory="", processes=8
1818
):
@@ -63,3 +63,4 @@ def upload_many_blobs_with_transfer_manager(
6363
print("Failed to upload {} due to exception: {}".format(name, result))
6464
else:
6565
print("Uploaded {} to {}.".format(name, bucket.name))
66+
# [END storage_transfer_manager_upload_many_blobs]

0 commit comments

Comments
 (0)