Python Client for Google Cloud Storage
Project description
This is a shared codebase for gcloud-rest-storage and 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
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
gcloud-rest-storage-5.2.2.tar.gz
(11.9 kB
view details)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba3593ca3bd8e06e0d144ef8f81a35ca1fe0d7c446467d336e810d59409abb7f |
|
MD5 | d13e5195487f4301540dd8e2e116b9c5 |
|
BLAKE2b-256 | eb903c29133118ca8b4f6254b98680431d65d7025ed56d19846ca27f8f09a6b2 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e62be744a8c585c3afef6a65bf86923cdeececf265a6cd276eb0672894671f |
|
MD5 | 938ef9b5f69ed744c3ab1751a5e65597 |
|
BLAKE2b-256 | e176873f0637f6b34dd43d1433d58ce65f4b3895686caa4c8816b8e971e0f5db |