samples: added upload from/download into memory samples#664
Conversation
|
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
unforced
left a comment
There was a problem hiding this comment.
All good besides those few things pointed to.
| @@ -0,0 +1,56 @@ | |||
| #!/usr/bin/env python | |||
|
|
|||
| # Copyright 2019 Google Inc. All Rights Reserved. | |||
There was a problem hiding this comment.
nit: update to Copyright 2021
There was a problem hiding this comment.
Same for the upload sample, thanks! Whoa I'm not sure if it's Google Inc or Google LLC. Let me check.
There was a problem hiding this comment.
it seems the 2021 ones have Google LLC. updated
There was a problem hiding this comment.
yep thanks, i just checked OSPO, and it's Google LLC
|
|
||
|
|
||
| def download_blob_into_memory(bucket_name, source_blob_name): | ||
| """Downloads a blob from the bucket.""" |
There was a problem hiding this comment.
Thanks for adding this! Could we update the description to """Downloads a blob into memory.""" and change the parameter name to blob_name? The word source might be a bit confusing?
| storage_upload_from_memory.upload_blob_from_memory( | ||
| test_bucket.name, "Hello, is it me you're looking for?", "test_upload_blob" | ||
| ) | ||
|
|
There was a problem hiding this comment.
You could either assert that the blob now exists or assert capsys.readouterr() here just to verify that the print statement successfully ran.
cojenco
left a comment
There was a problem hiding this comment.
Thanks @shaffeeullah for adding the samples🎉 Just a few comments. Also could you help update the samples readme (ref PR), thanks!
No description provided.