Jin
02/13/2024, 5:48 AMs3_block = S3.load('s3_test')
s3_block.append_path(f"result/{uuid}) <--- I'm finding any method like this
this is the example code what I use
from prefect.filesystems import S3
s3_block = S3.load('s3_test')
@flow(name="main", persist_result=True, result_storage=s3_block)
def main():
return "hello world"
Chris Guidry
02/13/2024, 2:31 PMbucket_path
is an attribute that you can just set on the block:
https://github.com/PrefectHQ/prefect/blob/main/src/prefect/filesystems.py#L455-L459
So in your code it would be like:
s3_block = S3.load('s3_test')
s3_block.bucket_path = "..."
I think you may want to save the block as well, depending on what you're doing, like:
s3_block.save(overwrite=True)
Jin
02/13/2024, 10:03 PMChris Guidry
02/13/2024, 10:03 PM