Skip to main content

Python Client for Google Cloud Storage

Project description

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

Latest PyPI Version (gcloud-aio-storage) Python Version Support (gcloud-aio-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.aio.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-aio-storage-5.2.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

gcloud_aio_storage-5.2.2-py2.py3-none-any.whl (14.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: gcloud-aio-storage-5.2.2.tar.gz
  • Upload date:
  • Size: 11.4 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-aio-storage-5.2.2.tar.gz
Algorithm Hash digest
SHA256 697ccf67f05c557fcba2d42df8994bbf389074a6ff1f6dfcdc6da17d69c2e40d
MD5 34b1591ed35d4a4df61326cf9314b7e2
BLAKE2b-256 10a63af24f8603a7c09a409e929357a924acbafb9277a2ec6111eb75832bb96f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcloud_aio_storage-5.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.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_aio_storage-5.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d967d64426383581e1a047e9d1f292341e2f3a1ee23224f7c8b89c1d55ca9df7
MD5 e7cb286e6c7676c70355b5b103056892
BLAKE2b-256 ab22239d1489588257f515fa45a65dac654820444469187c830fabe551c18792

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page