Add initial Prefect flow

This commit is contained in:
root
2025-09-30 20:36:56 +00:00
parent f26e50c825
commit cdb87af197
2 changed files with 19 additions and 0 deletions

17
test_flows/hello_world.py Normal file
View File

@@ -0,0 +1,17 @@
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()