Skip to content

Commit

Permalink
docs: remove and replace deprecated function download_as_string() (go…
Browse files Browse the repository at this point in the history
…ogleapis#508)

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 googleapis#504 🦕
  • Loading branch information
richardevs authored and cojenco committed Oct 13, 2021
1 parent eb0e1c0 commit ee46616
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 ee46616

Please sign in to comment.