Skip to main content
Version: 0.8

tecton.set_credentials

tecton.set_credentials(...)

Summary​

Explicitly override Tecton Service Account credentials.

Typically, the Tecton API Key and Tecton URL are set in environment variables (TECTON_API_KEY & API_SERVICE, respectively), but you can use this function to set the Tecton API Key and URL during an interactive Python session.

If user credentials are also set in the same session using tecton.login(), the user credentials take priority over the Service Account credentials.

Parameters​

  • tecton_api_key (Optional[str]) – Tecton API Key. (Default: None)

  • tecton_url (Optional[str]) – Tecton API URL. (Default: None)

Example​

tecton.set_credentials(tecton_api_key="<YOUR_API_KEY>", tecton_url="https://<DEPLOYMENT>.tecton.ai/api")

To change only the API key:

tecton.set_credentials(tecton_api_key="<YOUR_API_KEY>")

Was this page helpful?

🧠 Hi! Ask me anything about Tecton!

Floating button icon