Skip to content

Commit

Permalink
Merge pull request #46 from gogovan/AN-6051
Browse files Browse the repository at this point in the history
added download file function to storage
  • Loading branch information
ggx-jacechun authored Jan 24, 2024
2 parents 507f7ed + 8c3e922 commit 6ee3831
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ggvlib/google/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ def download_to_stream(
return file_object


def download_file(
bucket_name:str, file_path:str, dest_path:str
)->None:
"""Download file from bucket to path"""

blob = storage.Client().bucket(bucket_name).blob(file_path)
blob.download_to_filename(dest_path)
return None


def share(
bucket_name: str,
cloud_storage_path: str,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ggvlib"
version = "0.2.48"
version = "0.2.49"

description = ""
authors = ["Adam Hoffstein <[email protected]>","Jace Chun <[email protected]>"]
Expand Down

0 comments on commit 6ee3831

Please sign in to comment.