Hello World
The simplest recipe
Let’s first get used to the infrastructure for writing, running, and debugging recipes.
Create a file hello.py
anywhere:
from ice.recipe import recipe
async def say_hello():
return "Hello world!"
recipe.main(say_hello)
Run the recipe:
python hello.py
This will run the recipe and save an execution trace.
On the terminal, you will see a trace link and output:
Trace: http://localhost:8935/traces/01GE0GN5PPQWYGMT1B4GFPDZ09
Hello world!
If you follow the trace link (yours will be different), you will see a function node that you can click on, inspect inputs/outputs for, and show source code for:

Exercises
Add another function and call it from
say_hello
. Does it show up in the trace? What if you make it async and call it asresult = await my_function()
?
Last updated