Brock
10/28/2024, 8:05 PMimport controlflow as cf
emails = [
"Hello, I need an update on the project status.",
"Subject: Exclusive offer just for you!",
"Urgent: Project deadline moved up by one week.",
]
# Create a ControlFlow task to generate an reply
reply = cf.run(
"Write a polite reply to an email",
context=dict(email=emails[0]),
)
print(reply)
If this is in app.py
and I run it via python app.py
I get the expected output.
My question: where is this running? With prefect server running, I could see a flow running. I read references to prefect from the docs, but zooming out is the path to execute scripts as I did above? Trying to learn about how to organize and actually deploy work, along with observability and logging.Jeremiah
cf.flow()
, it is also automatically a Prefect flow and can be deployed with Prefect e.g. to run in a Prefect work pool. However that's not required here.Brock
10/28/2024, 9:49 PMprefect server start
on my local laptop is the TLDR.Jeremiah
prefect profile ls
you can see the active profile, then prefect profile inspect <name>
to see how its configuredJeremiah
Brock
10/29/2024, 1:57 AMJeremiah