Is there a way to query a specific version of an object from cloud storage?
def get_file_from_bucket(kind, id, ver:str)->dict:
bucket = "bucket123"
blob_path = "records" + "/" + kind + "/" + id+"#"+ver
print("{}".format(blob_path))
cred_file = Path(os.path.dirname((os.path.dirname(os.path.abspath(__file__)))),"service_file")
storage_client = storage.Client.from_service_account_json(cred_file)
bucket = storage_client.get_bucket(bucket)
b = bucket.get_blob(blob_path)
return b
>> None
The above function returns None, but when I remove the version I get the respective object. Is there a way to retrieve an object with specified version?
Is there a way to query a specific version of an object from cloud storage?
>> NoneThe above function returns None, but when I remove the version I get the respective object. Is there a way to retrieve an object with specified version?