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.1.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

google_cloud_storage-1.11.1-py2.py3-none-any.whl (59.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: google-cloud-storage-1.11.1.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for google-cloud-storage-1.11.1.tar.gz
Algorithm Hash digest
SHA256 d204a71108ca3ed7ac99aee5b390abbe67d6bd8f176b579cc9ad02ea761d2c3e
MD5 c204721d6489cc2faef5a8c19017c826
BLAKE2b-256 a898e26bbf69dac35a6467d71088e71077837f57673ef9ee3fac8fbfc7993d2d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: google_cloud_storage-1.11.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 59.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for google_cloud_storage-1.11.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f287aa293be22d4123275bed386d9674fa8406349af9d07e6fd270e5b88a1027
MD5 adee8adf70cf276ff2f90971e85d664f
BLAKE2b-256 48f9e433d0cdc65f7c44199a7e8d7f716ebfa25ef8af1ca15697df07aa7af1c7

See more details on using hashes here.

Provenance

Supported by

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