I see that `flow.register()` initializes a Client ...
# prefect-community
a
I see that
flow.register()
initializes a Client object with no arguments https://github.com/PrefectHQ/prefect/blob/4d8337f75fe9bbb3024faa3b74a8f7debbb596d0/src/prefect/core/flow.py#L1663-L1665. From what I can tell, this will use the api_token value from config.cloud.auth_token (https://docs.prefect.io/api/latest/client/client.html). What should we do in a build server scenario? Will
Client()
read from an environment variable if one is set?
From here https://docs.prefect.io/core/concepts/configuration.html#environment-variables it looks like I should be able to set
config.cloud.auth_token
by setting
PREFECT__CLOUD__AUTH_TOKEN
. I'll give that a shot
n
Hi @Adam Roderick - using the environment variable should work just fine 🙂
(but let me know if you have any trouble)
a
confirmed--worked great. thanks
👍 1