Skip to main content

Python Client for Google Cloud Storage

Project description

Python idiomatic client for Google Cloud Storage

pypi versions

Quick Start

$ pip install --upgrade google-cloud-storage

Authentication

With google-cloud-python we try to make authentication as painless as possible. Check out the Authentication section in our documentation to learn more. You may also find the authentication document shared by all the google-cloud-* libraries to be helpful.

Using the API

Google Cloud Storage (Storage API docs) allows you to store data on Google infrastructure with very high reliability, performance and availability, and can be used to distribute large data objects to users via direct download.

See the google-cloud-python API storage documentation to learn how to connect to Cloud Storage using this Client Library.

You need to create a Google Cloud Storage bucket to use this client library. Follow along with the official Google Cloud Storage documentation to learn how to create a bucket.

from google.cloud import storage
client = storage.Client()
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())
blob.upload_from_string('New contents!')
blob2 = bucket.blob('remote/path/storage.txt')
blob2.upload_from_filename(filename='/local/path.txt')

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-cloud-storage-1.3.2.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_cloud_storage-1.3.2-py2.py3-none-any.whl (46.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file google-cloud-storage-1.3.2.tar.gz.

File metadata

File hashes

Hashes for google-cloud-storage-1.3.2.tar.gz
Algorithm Hash digest
SHA256 9f6524c75456f67f6aaff3575b0cbbdae7b3c7fd3fa792e4c6f77e0402071330
MD5 e2922ba8347e09853af238aeb4ac5691
BLAKE2b-256 c4bd2abfa5ae2ee50ff8d0ef07bb23cc5c6912003b6735f92933f08f343165c7

See more details on using hashes here.

File details

Details for the file google_cloud_storage-1.3.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for google_cloud_storage-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cdd055095ce8ffa17887ddd3948ea867c47bf088e97bf84dafc77bd9a802ac89
MD5 b70ad9df139d0e000040b927dc3e2305
BLAKE2b-256 50523977223dce32507485ff3603c57c31800f53d49b77cdf655de89c7f25271

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page