company-research-agent / utils /config_loader.py
jaimin's picture
Upload 44 files
0d18784 verified
import os
from dotenv import load_dotenv
# Load environment variables from a .env file
load_dotenv()
def get_config(key: str, default: str = None) -> str:
"""
Retrieve a configuration value from environment variables.
Args:
key (str): The key of the configuration.
default (str): The default value if the key is not found.
Returns:
str: The value of the configuration or the default value.
"""
return os.getenv(key, default)