I have a CSV file staged daily in a Firebase storage bucket. I want to download this updated CSV file to my local machine on daily basis.
Using the following Python code, I am able to generate a link where I can click and the download the file. However, I am wondering if I can download it without any need of clicking the link generated.
import datetime
import firebase_admin
from firebase_admin import credentials
from firebase_admin import storage
### Fetch the service account key JSON file contents
cred = credentials.Certificate("SDK_key.json")
### Initialize the app with a service account, granting admin privileges
app = firebase_admin.initialize_app(cred, {'storageBucket': 'XYZ.appspot.com',}, name='storage')
bucket = storage.bucket(app=app)
### Address of file to downloaded
blob = bucket.blob("test.csv")
### Generate a link and clicking on the link downloads the file
print(blob.generate_signed_url(datetime.timedelta(seconds=300), method='GET'))