how would I authenticate with prefect cloud non-in...
# prefect-getting-started
p
how would I authenticate with prefect cloud non-interactively? I added PREFECT_CLOUD_KEY=pnu_... and PREFECT_API_URL=https://api.prefect.cloud/api/accounts/... environment variables. For example if I wanted to run this file without running prefect cloud login
Copy code
import time
from prefect import flow, serve


@flow
def slow_flow(sleep: int = 60):
    "Sleepy flow - sleeps the provided amount of time (in seconds)."
    time.sleep(sleep)


@flow
def fast_flow():
    "Fastest flow this side of the Mississippi."
    return


if __name__ == "__main__":
    slow_deploy = slow_flow.to_deployment(name="sleeper", interval=45)
    fast_deploy = fast_flow.to_deployment(name="fast")
    serve(slow_deploy, fast_deploy)
k
the first env var name should be
PREFECT_API_KEY
as long as those two are present, prefect should be authed to your cloud account
p
whoops, I changed the name at some point I guess. thanks @Kevin Grismore