get_api_key#
- alphagenome.colab_utils.get_api_key(secret='ALPHA_GENOME_API_KEY')[source]#
Returns API key from environment variable or Colab secrets.
Tries to retrieve the API key from the environment first. If not found, attempts to retrieve it from Colab secrets (if running in Colab).
- Parameters:
secret (
str(default:'ALPHA_GENOME_API_KEY')) – The name of the environment variable or Colab secret key to retrieve.- Raises:
ValueError – If the API key cannot be found in the environment or Colab secrets.