https://prefect.io logo
Title
p

Paco Ibañez

10/26/2022, 4:48 PM
Hello! I have an Azure block to store my flows, how can I store the flows in different folders within my block?
1
this is how im loading my flows
from prefect.filesystems import Azure
az_block = Azure.load("flows")

...

deployment = Deployment.build_from_flow(
   name = PREFECT_DEPLOYMENT_NANE,
   flow = flow,
   storage = az_block,
   infrastructure = infrastructure,
   tags = default_tags
)
1
r

Ryan Peden

10/26/2022, 4:56 PM
You can provide a
path
param that will be added to whatever base folder you provided in the Azure, for example:
deployment = Deployment.build_from_flow(
   name = PREFECT_DEPLOYMENT_NANE,
   flow = flow,
   storage = az_block,
   infrastructure = infrastructure,
   tags = default_tags,
   path = "path/relative/to_block_basedir"
)
So if the folder you set in your block was
my_storage_container/prefect-flows
, code for this deployment would end up in ``my_storage_container/prefect-flows/path/relative/to_block_basedir``. It's also available for CLI deployments via the
--path
flag should you ever decide to go that route.
p

Paco Ibañez

10/26/2022, 5:03 PM
thanks so much!