Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasborgen/storage-bucket
For easy GCP Storage Bucket interaction
https://github.com/thomasborgen/storage-bucket
cloud cloudstorage gcp storage-bucket
Last synced: 3 months ago
JSON representation
For easy GCP Storage Bucket interaction
- Host: GitHub
- URL: https://github.com/thomasborgen/storage-bucket
- Owner: thomasborgen
- License: mit
- Created: 2020-05-06T17:56:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-10T07:24:37.000Z (over 2 years ago)
- Last Synced: 2024-10-11T01:54:50.756Z (4 months ago)
- Topics: cloud, cloudstorage, gcp, storage-bucket
- Language: Python
- Homepage:
- Size: 909 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Storage Bucket
Makes working with GCP Storage bucket a breeze
___

[](https://codecov.io/gh/thomasborgen/storage-bucket)
[](https://pypi.org/project/storage-bucket/)
[](https://github.com/wemake-services/wemake-python-styleguide)
___**[Documentation](https://thomasborgen.github.io/storage-bucket/) |
[Source Code](https://github.com/thomasborgen/storage-bucket) |
[Issue Tracker](https://github.com/thomasborgen/storage-bucket/issues)**The goal of this package is to make it easy to work with GCP Storage Bucket. We felt that using googles package(google-cloud-storage) was a horrible experience and we believe that this package abstracts away the object oriented approach taken by google and introduces a more functional approach.
## Quickstart
Get the package
```sh
pip install storage-bucket
```Or better with `poetry`
```sh
poetry add storage-bucket
```Download your keyfile and save it as key.json and point to it with env var:
```sh
gcloud iam service-accounts keys create key.json --iam-account your_service_account@your_project.iam.gserviceaccount.com
``````sh
export GOOGLE_APPLICATION_CREDENTIALS='key.json'
```### Download
```python
from storage_bucket import download_filefile_data = download_file('bucket', 'filename')
print(file_data)
```### Upload
```python
from storage_bucket import upload_fileupload_file(b'data', 'bucket_name', 'filename')
```### Supported operations - File
`Download`, `Upload`, `List`, `Delete`
### Supported operations - Bucket
`Create`, `Delete`, `List`
### Check [Usage](https://thomasborgen.github.io/storage-bucket/usage).
## Contribution
Like the library and want to help us, check: [contributing](https://thomasborgen.github.io/storage-bucket/contrib/contributing/)