Hey, is there a way to instantly force the executi...
# ask-community
f
Hey, is there a way to instantly force the execution of a PrefectSecret task and set it with no upstream ?
k
Yes
Copy code
with Flow(...)
    PrefectSecret("Something")()
a
Yes, there is! You can invoke it from your local Python script using e.g.:
Copy code
from prefect.tasks.secrets import PrefectSecret

print(PrefectSecret("A_PASSWORD_DEV").run())
You may need to set this env variable beforehand:
Copy code
export PREFECT__CLOUD__USE_LOCAL_SECRETS=false