from google.cloud import storage import firebase_admin from firebase_admin import credentials try: cred = credentials.Certificate("servicekey.json") try: firebase_admin.initialize_app( cred, {"databaseURL": "https://farmbase-b2f7e-31c0c.firebaseio.com/"} ) except: print("fire running") except: abs = 1 def make_folder_public(bucket_name, folder_path): client = storage.Client() bucket = client.bucket(bucket_name) blob_iterator = bucket.list_blobs(prefix=folder_path) for blob in blob_iterator: blob.acl.all().grant_read() blob.acl.save() if __name__ == "__main__": bucket_name = "farmbase-b2f7e.appspot.com" folder_path = "PaidMonitoredFieldsPolygons/TCXcp5VIsfhHZrh0nm2VsgBtcGy2" make_folder_public(bucket_name, folder_path)