I don’t think so. It would just get serialized along with the task. Do you get an error?
a
Anna Geller
05/04/2022, 3:56 PM
also, are you asking because of Prefect Secrets?
j
Jason
05/04/2022, 4:01 PM
Yeah, I think I've figured out the class error. I have an API abstraction module that I'd like to use across the tasks, and it takes in a token and secret, so I was curious about the best practice. I like to use class organization instead of using many different methods when possible.
a
Anna Geller
05/04/2022, 4:18 PM
Gotcha. You can definitely combine functional tasks with your custom classes. Many users use
PrefectSecret
tasks in their flows and pass the value of the secret to a downstream task (which may use classes inside that receive the input data from a task) - this would allow you to get the best of both worlds. LMK if you need an example
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.