Best approach to create a library of reused declarative tasks?

I reuse a series of declarative tasks in my flows. I was wondering in Prefect 1.0 if we can create a library of declarative tasks? Is the best approach to create these functions in a separate module w/o the task decorator and then import then into my flow w/ the task decorator?

Thank you for any advice!

1 Like

Sure, you can!

The easiest approach would be to build a Python package and use that code in your flows. If you need an example, check this simple flow with a package containing utility functions for flows:

1 Like