Skip to main content

gcshus: GCS helper utils.

Project description

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

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

gcshus-0.0.4.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file gcshus-0.0.4.tar.gz.

File metadata

  • Download URL: gcshus-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for gcshus-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e99626b1b3e8dff252db6c8631ec2878a43b408a9069650a04e0c3a3dec01fa4
MD5 6e1ada776e90bfb3a7d1b94b3e866ac8
BLAKE2b-256 2387c298e55c97942f148575547a515f59f98e332a4cdd9702d830c7876c40e6

See more details on using hashes here.

Supported by

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