Files
prefect-flows/test_flows/hello_world.py
2025-09-30 20:38:06 +00:00

17 lines
351 B
Python

from prefect import flow, task
import time
@task
def say_hello(name: str) -> str:
message = f"Hello, {name}!"
print(message)
return message
@flow(name="example-flow")
def example_flow(name: str = "World"):
result = say_hello(name)
time.sleep(2) # Simuliere Arbeit
return result
if __name__ == "__main__":
example_flow()