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.2.0.tar.gz (73.2 kB 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.2.0-py2.py3-none-any.whl (43.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for google-cloud-storage-1.2.0.tar.gz
Algorithm Hash digest
SHA256 57bf580953ffbf9b1ac60cd21ab14071ea20c3bc176152767ec85d453c1e37ff
MD5 2d309182fc95cdbe31b7dc354f5c51e5
BLAKE2b-256 97779390ef4ed0518af1476825d2c326ce0a1d86033ce75d55c6bfd6e7971c16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_cloud_storage-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f131af2804d922b36315f0e5e2f210ae562e3a02754d91b6577a2075c49d6af6
MD5 8c1c0f9e6c828053942e543cd7ffacd4
BLAKE2b-256 8604c57a3434533daf97dfc14e7cbd8936f0ad2f6f632f44c9de0f5e48f4b825

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