tecton.login
tecton.login(...)
Summary​
Authenticate to a Tecton instance using user credentials.
These credentials last for the duration of the interactive Python session. A
Service Account API key can also be set in the session using set_credentials
,
but if user credentials are set, they will take priority over Service Account
credentials.
This method will prompt you to open a link in your browser. Sign in to Tecton and it will display an authorization code to copy and paste into standard input back in your notebook.
If your interactive environment does not support standard input (for example EMR
notebooks do not), you can set interactive=False
and use the 2-step login
flow:
tecton.login("https://<yourco>.tecton.ai", interactive=False)
tecton.login_with_code(<authorization_code>)
To use tecton.login(interactive=True)
in a Databricks notebook, the notebook
cluster must running on
Databricks Runtime 11.3
or higher.
It is currently not possible to query the online store using user credentials.
To use get_online_features
, a Service Account API key must be set using
set_credentials(tecton_api_key=<key>)
.
Parameters​
-
tecton_url
(Optional
[str
]) – Tecton URL. (e.g.:https://<yourco>.tecton.ai
. Default:None
) -
interactive
(bool
)- When set to True, you will be prompted to pass the authorization code via
standard input to complete login. This relies on your interactive
environment supporting Python's builtin
input()
function. If your environment does not support this interactive login, you can calllogin()
withinteractive=False
to bypass the standard input prompt, and then pass the authorization code totecton.login_with_code(<authorization_code>)
to complete login. (Default:True
)
- When set to True, you will be prompted to pass the authorization code via
standard input to complete login. This relies on your interactive
environment supporting Python's builtin