Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. def download_output(output_bucket, filename):
  2. """Downloads the output file from Cloud Storage and returns it as a
  3. string."""
  4. print('Downloading output file')
  5. client = storage.Client()
  6. bucket = client.get_bucket(output_bucket)
  7. output_blob = (
  8. 'keys/{}'
  9. .format(filename))
  10. return bucket.blob(output_blob).download_as_string()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement