Jackson Nguyen
03/18/2026, 8:07 PMMarvin
03/18/2026, 8:07 PMMarvin
03/18/2026, 8:10 PMfrom prefect import flow
@flow
def my_flow():
pass
# One deployment per pool
my_flow.deploy(name="my-flow-prod", work_pool_name="prod-pool")
my_flow.deploy(name="my-flow-staging", work_pool_name="staging-pool")
Example via prefect.yaml:
deployments:
- name: my-flow-prod
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: prod-pool
- name: my-flow-staging
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: staging-pool
Then apply them:
prefect deploy --all
References:
- Deployments concepts (deployment schema and requirements)
- Work pools concepts
- Define deployments with prefect.yaml (multiple deployments in one file)
If you share the pool names you’re targeting, I can tailor the YAML/Python examples to your setup.