Is it possible to set a Flow parameter’s type in c...
# ask-community
s
Is it possible to set a Flow parameter’s type in code? When I go into one of our parametrized flows in Prefect Cloud, each parameter has a Type dropdown. I’d like to explicitly set each of our Parameters to one one the types from the dropdown.
k
You can’t in Prefect 1 because they come in JSON. The dropdown is just inferring. This is available in 2.0 as a feature though. For 1.0, I would just check them inside a task for now
s
Roger that, thank you!
k
2.0 allows for custom classes also because it is based on pydantic.
👍 1