Skip to content

Instantly share code, notes, and snippets.

@deivguerrero
Created March 26, 2019 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deivguerrero/bf4e9f850f719b5d1673acee1ba8d6d6 to your computer and use it in GitHub Desktop.
Save deivguerrero/bf4e9f850f719b5d1673acee1ba8d6d6 to your computer and use it in GitHub Desktop.
Carga un archivo a un déposito en Google Cloud
from google.cloud import storage
BUCKET_NAME = "audio-devlife"
BLOB_PATH = "audio.flac"
storage_client = storage.Client()
bucket = storage_client.get_bucket(BUCKET_NAME)
blob = bucket.blob(BLOB_PATH)
with open(BLOB_PATH, "rb") as my_file:
blob.upload_from_file(my_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment