Hi everybody, I'm currently hosting my prefect ser...
# ask-community
s
Hi everybody, I'm currently hosting my prefect server with multiple deployments on a remote machine in my network. I'm now calling these deployed flows within a flow that is running on my local machine. These deployed flows are returning some kind of data. How can I know access their return values without the use of cloud services like S3 Bucket?
l
I think you can use the
LocalFileSystem
to store results locally.
Copy code
from prefect.filesystems import LocalFileSystem

# To create the block
mynewblock = LocalFileSystem(basepath="/path/to/store/results")
mynewblock.save("local-fs-block")

# To use the block
my_local_fs_block = LocalFileSystem.load("local-fs-block")

# Then in your flow decorator, pass this to the result_storage.
@flow(result_storage=my_local_fs_block, persist_result=True)
Alternatively, you can also set the env var
PREFECT_DEFAULT_RESULT_STORAGE_BLOCK
like PREFECT_DEFAULT_RESULT_STORAGE_BLOCK=local-fs-block instead.