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

This version

1.1.1

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.1.1.tar.gz (37.1 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.1.1-py2.py3-none-any.whl (41.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for google-cloud-storage-1.1.1.tar.gz
Algorithm Hash digest
SHA256 11e709ed37523eb1bb68fed4dd31fb176cd7734be89cbfc5c22f1898562041bd
MD5 f9d1a292c45ffcfaf5e7a9197340967d
BLAKE2b-256 b8bb4a2579dee4735c920a9f56a5b4e44c9c829753feabe156e8c56c4cf41500

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_cloud_storage-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5027d801f3d944ebcf227d8c86bbdd58a4f0f06fd37e58c001b6223fe69e43a8
MD5 db7a07fe83c9e8ed1fa6c8cc67995744
BLAKE2b-256 95d8718da1aeaf60c95ffdb61029b6c9ca59bcff0ab6d5a601f6be8997cb1b76

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