e

    Evan Curtin

    7 months ago
    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?
    alex

    alex

    7 months ago
    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.