Add speaking endpoints and clean code.
This commit is contained in:
15
helper/firebase_helper.py
Normal file
15
helper/firebase_helper.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from google.cloud import storage
|
||||
|
||||
def download_firebase_file(bucket_name, source_blob_name, destination_file_name):
|
||||
# Downloads a file from Firebase Storage.
|
||||
storage_client = storage.Client()
|
||||
bucket = storage_client.bucket(bucket_name)
|
||||
blob = bucket.blob(source_blob_name)
|
||||
blob.download_to_filename(destination_file_name)
|
||||
print(f"File downloaded to {destination_file_name}")
|
||||
return destination_file_name
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user