acoustic-parrot-22802
09/18/2025, 5:58 PMancient-wolf-19325
09/18/2025, 5:58 PMfrom flytekit import task, workflow
@task
def say_hello() -> str:
return "Hello, World!"
@workflow
def hello_world_wf() -> str:
res = say_hello()
return res
if __name__ == "__main__":
print(f"Running hello_world_wf() {hello_world_wf()}")
This code can be run locally with python or using the Flyte CLI with pyflyte run hello_world.py hello_world_wf. For more, see the Flyte Hello World example and official quickstart guide.
Would you like more detail on running this workflow or deploying it to a Flyte cluster?
Sources:
- https://github.com/flyteorg/flytesnacks/blob/master/examples/basics/basics/hello_world.py
- https://github.com/flyteorg/flyte/blob/master/docs/user_guide/quickstart_guide.md 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.acoustic-parrot-22802
09/18/2025, 5:59 PMacoustic-parrot-22802
09/18/2025, 5:59 PMancient-wolf-19325
09/18/2025, 5:59 PMpyflyte run --remote hello_world.py hello_world_wf
This will register and run the workflow on the cluster. You will receive a URL to the Flyte Console where you can monitor the execution. For more details, see the Flyte environment setup guide and quickstart guide.
Would you like step-by-step instructions for setting up the cluster and running the workflow?
Sources:
- https://github.com/flyteorg/flyte/blob/master/docs/user_guide/environment_setup.md
- https://github.com/flyteorg/flyte/blob/master/docs/user_guide/quickstart_guide.md 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.acoustic-parrot-22802
09/18/2025, 6:01 PMancient-wolf-19325
09/18/2025, 6:01 PMimport flyte
env = flyte.TaskEnvironment("hello_world")
@env.task
def hello_world(name: str) -> str:
return f"Hello, {name}!"
@env.task
def main(name: str) -> str:
for i in range(10):
hello_world(name)
return "Done"
if __name__ == "__main__":
flyte.init()
flyte.run(main, name="World")
Workflows are constructed by tasks calling other tasks. For more, see the Flyte 2 user guide.
Would you like more detail on running this in a Flyte v2 cluster?
Sources:
- https://www.union.ai/docs/v2/flyte/user-guide/flyte-2/ 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.acoustic-parrot-22802
09/18/2025, 6:03 PMancient-wolf-19325
09/18/2025, 6:03 PMacoustic-parrot-22802
09/18/2025, 6:05 PMancient-wolf-19325
09/18/2025, 6:05 PM