Skip to main content

Python Client for Google Cloud Storage

Project description

This is a shared codebase for gcloud-rest-storage and gcloud-rest-storage

Latest PyPI Version (gcloud-rest-storage) Python Version Support (gcloud-rest-storage) Python Version Support (gcloud-rest-storage)

Installation

$ pip install --upgrade gcloud-{aio,rest}-storage

Usage

To upload a file, you might do something like the following:

import aiohttp
from gcloud.rest.storage import Storage


async with aiohttp.ClientSession() as session:
    client = Storage(session=session)

    async with open('/path/to/my/file', mode='r') as f:
        status = await client.upload('my-bucket-name',
                                     'path/to/gcs/folder',
                                     f.read())
        print(status)

Note that there are multiple ways to accomplish the above, ie,. by making use of the Bucket and Blob convenience classes if that better fits your use-case.

You can also refer smoke test for more info and examples.

Contributing

Please see our contributing guide.

Project details


Download files

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

Source Distribution

gcloud-rest-storage-5.2.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

gcloud_rest_storage-5.2.2-py2.py3-none-any.whl (15.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gcloud-rest-storage-5.2.2.tar.gz.

File metadata

  • Download URL: gcloud-rest-storage-5.2.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for gcloud-rest-storage-5.2.2.tar.gz
Algorithm Hash digest
SHA256 ba3593ca3bd8e06e0d144ef8f81a35ca1fe0d7c446467d336e810d59409abb7f
MD5 d13e5195487f4301540dd8e2e116b9c5
BLAKE2b-256 eb903c29133118ca8b4f6254b98680431d65d7025ed56d19846ca27f8f09a6b2

See more details on using hashes here.

File details

Details for the file gcloud_rest_storage-5.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: gcloud_rest_storage-5.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for gcloud_rest_storage-5.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 47e62be744a8c585c3afef6a65bf86923cdeececf265a6cd276eb0672894671f
MD5 938ef9b5f69ed744c3ab1751a5e65597
BLAKE2b-256 e176873f0637f6b34dd43d1433d58ce65f4b3895686caa4c8816b8e971e0f5db

See more details on using hashes here.

Supported by

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