Thread
#prefect-community
    Florian Guily

    Florian Guily

    6 months ago
    Hey, is there a way to instantly force the execution of a PrefectSecret task and set it with no upstream ?
    Kevin Kho

    Kevin Kho

    6 months ago
    Yes
    with Flow(...)
        PrefectSecret("Something")()
    Anna Geller

    Anna Geller

    6 months ago
    Yes, there is! You can invoke it from your local Python script using e.g.:
    from prefect.tasks.secrets import PrefectSecret
    
    print(PrefectSecret("A_PASSWORD_DEV").run())
    You may need to set this env variable beforehand:
    export PREFECT__CLOUD__USE_LOCAL_SECRETS=false