Patrick Tan
04/15/2022, 2:09 PMKevin Kho
04/15/2022, 2:18 PMprefect.context.secrets
, parameters will be in prefect.context.parameters
so you can pull those inside a state handler. Would that help you?Patrick Tan
04/15/2022, 2:20 PMKevin Kho
04/15/2022, 2:23 PMdef mystatehandler(obj, old_state, new_state):
print(prefect.context.parameters)
print(prefect.context.secrets)
Secret("name").get()
and parameters is a dict. I think secrets might be a list (not super sure). But you can also pull a secret if you know the name with Secret.get()
print(prefect.context.parameters["x"])
Patrick Tan
04/15/2022, 3:44 PMKevin Kho
04/15/2022, 3:44 PM