Slackbot
07/16/2025, 10:16 AMMarvin
07/16/2025, 10:16 AMMarvin
07/16/2025, 10:17 AMbash
prefect work-pool create "my-process-pool" --type process
2. Then, in your Python code, you can deploy your flow to the process pool like this:
python
from prefect import flow
@flow
def my_flow():
# your flow code here
pass
if __name__ == "__main__":
my_flow.from_source(
source="./", # or your source path
entrypoint="path/to/file.py:my_flow"
).deploy(
name="my-flow-deployment",
work_pool_name="my-process-pool"
)
The process pool is a great choice for local development and testing because:
- It runs flow runs as subprocesses on your local machine
- It's lightweight and doesn't require any container infrastructure
- It's perfect for development and testing workflows
Keep in mind that:
1. Process pools are designed for local execution
2. Each flow run will execute in its own subprocess
3. The worker needs to be running to execute flows (you can start it with prefect worker start -p "my-process-pool")
Would you like me to provide more details about any specific aspect of process pool deployments?