https://prefect.io logo
Title
m

Mars

04/20/2022, 8:09 PM
Hi all, I’m evaluating Prefect as a data pipeline tech upgrade for our company. I’m putting together some pipeline examples to share with the team and I’m wondering what a good dev-test-debug-deploy loop looks like. The example flows I’ve found in the docs and the blog use
flow.run()
for local dev, then edit the code and switch to
flow.register()
. I don’t like editing the code to switch between local dev and deployment, and it doesn’t feel like your typical Python webapp dev loop. Is there a better way to do this?
k

Kevin Kho

04/20/2022, 8:11 PM
You can use the CLI to register
prefect register …
and then move the
flow.run()
into the
if name == main
part so that it is invoked by
python filename.py
:gratitude-thank-you: 2