twinlab.set_api_key#

twinlab.set_api_key(api_key, verbose=False)[source]#

Set the user API key for their twinLab cloud account.

Setting this will override the API key set in the environment variable TWINLAB_API_KEY in the .env file for the current session. This function can also be used instead of setting a TWINLAB_API_KEY in a .env file.

Parameters:
  • api_key (str) – API key to use for access to the twinLab cloud.

  • verbose (bool, optional) – Display information about the operation while running.

Return type:

None

Example

tl.set_api_key("12345")