Skip to main content

Tutorial Overview

The final step in our tutorial is to run our DAG. We’ll need to set one argument for our dag’s execute function, and move everything into an async function.

Setting the execute args

If you will remember, we didn’t set the arguments for our CatFactTool, so we will now do so with set_execute_args. The function takes a dictionary of the format: {"args": list, "kwargs": dict}. In our case, we have max_length = 100 and limit = 1.
example_dag.py

Running with asyncio

The last step is to move all the code into an async function called main, and run it with asyncio.
example_dag.py
And with that… this tutorial is finished! We’re excited to see what you build with Trellis :)