Skip to content

Commit

Permalink
docs: remove and replace deprecated function download_as_string() (#508)
Browse files Browse the repository at this point in the history
Remove deprecated function download_as_string(), replace with download_as_bytes(). [1]
[1] https://github.com/googleapis/python-storage/blob/master/google/cloud/storage/blob.py#L138

Fixes #504 🦕
  • Loading branch information
richardevs committed Jul 16, 2021
1 parent d4a86ce commit 8dfa4d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -98,7 +98,7 @@ how to create a bucket.
bucket = client.get_bucket('bucket-id-here')
# Then do other things...
blob = bucket.get_blob('remote/path/to/file.txt')
print(blob.download_as_string())
print(blob.download_as_bytes())
blob.upload_from_string('New contents!')
blob2 = bucket.blob('remote/path/storage.txt')
blob2.upload_from_filename(filename='/local/path.txt')

0 comments on commit 8dfa4d4

Please sign in to comment.