Name | gcshus JSON |
Version |
0.0.4
JSON |
| download |
home_page | https://github.com/yokoe/gcshus |
Summary | gcshus: GCS helper utils. |
upload_time | 2023-11-05 13:50:02 |
maintainer | yokoe |
docs_url | None |
author | yokoe |
requires_python | |
license | MIT |
keywords |
gcs
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# gcshus
GCS Helper Utils for Python
## How to use
### Upload a file
```
import gcshus
from google.cloud import storage
gcshus.upload(
storage.Client(), "my-bucket", "/path/to/src.txt", "dst.txt"
)
```
### Generate a signed url for download
```
import gcshus
from google.cloud import storage
url = gcshus.generate_download_signed_url_with_token_refresh(
storage.Client(), "my-bucket", "dst.txt", 5
)
```
### Download a file
```
import gcshus
from google.cloud import storage
gcshus.download(storage.Client(), bucket, "some/remote/blob.txt", "local-file.txt")
```
## Run test
```
docker compose up
```
Raw data
{
"_id": null,
"home_page": "https://github.com/yokoe/gcshus",
"name": "gcshus",
"maintainer": "yokoe",
"docs_url": null,
"requires_python": "",
"maintainer_email": "kreuz45@kreuz45.com",
"keywords": "gcs",
"author": "yokoe",
"author_email": "kreuz45@kreuz45.com",
"download_url": "https://files.pythonhosted.org/packages/23/87/c298e55c97942f148575547a515f59f98e332a4cdd9702d830c7876c40e6/gcshus-0.0.4.tar.gz",
"platform": null,
"description": "# gcshus\nGCS Helper Utils for Python\n\n## How to use\n### Upload a file\n```\nimport gcshus\nfrom google.cloud import storage\n\ngcshus.upload(\n storage.Client(), \"my-bucket\", \"/path/to/src.txt\", \"dst.txt\"\n)\n```\n\n### Generate a signed url for download\n```\nimport gcshus\nfrom google.cloud import storage\n\nurl = gcshus.generate_download_signed_url_with_token_refresh(\n storage.Client(), \"my-bucket\", \"dst.txt\", 5\n)\n```\n\n### Download a file\n```\nimport gcshus\nfrom google.cloud import storage\n\ngcshus.download(storage.Client(), bucket, \"some/remote/blob.txt\", \"local-file.txt\")\n```\n\n## Run test\n```\ndocker compose up\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "gcshus: GCS helper utils.",
"version": "0.0.4",
"project_urls": {
"Download": "https://github.com/yokoe/gcshus",
"Homepage": "https://github.com/yokoe/gcshus"
},
"split_keywords": [
"gcs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2387c298e55c97942f148575547a515f59f98e332a4cdd9702d830c7876c40e6",
"md5": "6e1ada776e90bfb3a7d1b94b3e866ac8",
"sha256": "e99626b1b3e8dff252db6c8631ec2878a43b408a9069650a04e0c3a3dec01fa4"
},
"downloads": -1,
"filename": "gcshus-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "6e1ada776e90bfb3a7d1b94b3e866ac8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3787,
"upload_time": "2023-11-05T13:50:02",
"upload_time_iso_8601": "2023-11-05T13:50:02.329971Z",
"url": "https://files.pythonhosted.org/packages/23/87/c298e55c97942f148575547a515f59f98e332a4cdd9702d830c7876c40e6/gcshus-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-05 13:50:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yokoe",
"github_project": "gcshus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "gcshus"
}