Skip to main content

Google Cloud Storage API client library

Project description

Python idiomatic client for Google Cloud Storage

pypi versions

Quick Start

$ pip install --upgrade google-cloud-storage

For more information on setting up your Python development environment, such as installing pip and virtualenv on your system, please refer to Python Development Environment Setup Guide for Google Cloud Platform.

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()
# https://console.cloud.google.com/storage/browser/[bucket-id]/
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.11.0.tar.gz (5.4 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.11.0-py2.py3-none-any.whl (52.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: google-cloud-storage-1.11.0.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.0

File hashes

Hashes for google-cloud-storage-1.11.0.tar.gz
Algorithm Hash digest
SHA256 c444345b17d94f5152b68cedfa55d2f14cd3dd1956e628d613e6f05c89d45efc
MD5 fd913db944e9b9104e9dc4008d28d7e1
BLAKE2b-256 7ec93341be8fd18e4958cae25dca215140c4e2dd449527c5d1193ebdd03b9231

See more details on using hashes here.

File details

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

File metadata

  • Download URL: google_cloud_storage-1.11.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.0

File hashes

Hashes for google_cloud_storage-1.11.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 452628baba7aa6cf89c5b82143fdfd3f277c17133ce2dce90ebcbdfeb0250bc8
MD5 6886ebd097ee6043e58d007ae0ab0331
BLAKE2b-256 e08db953de214de5dcfc2362df0261c07e50b84e41697f84ce8e6083e9836052

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