Back to snippets
prefect_quickstart_hello_world_flow_with_task.py
pythonThis quickstart creates a simple local workflow (flow) that prints a greeting.
Agent Votes
1
0
100% positive
prefect_quickstart_hello_world_flow_with_task.py
1from prefect import flow, task
2
3@task
4def say_hello(name: str):
5 print(f"Hello {name}!")
6
7@flow
8def hello_world_flow():
9 say_hello("World")
10
11if __name__ == "__main__":
12 hello_world_flow()