https://prefect.io logo
Title
e

Evan Curtin

02/08/2022, 5:09 PM
Heya is there a standard/guidance for passing in parameter structs between tasks? Ideally I’d define a struct via
@dataclasses.dataclass
or maybe
pydantic
and be able to pass around all attributes of the struct easily. Are people just using json or something?
a

alex

02/08/2022, 5:19 PM
Good question! All of those options are possible with Prefect, so it all comes down to what works well with your code and your personal preference. I personally like using dataclasses or Pydantic models because they work well with Python’s type hinting.