|
|
|
@ -34,8 +34,16 @@ def get_env_tags(tag_list: List[str]) -> dict:
|
|
|
|
|
|
|
|
|
|
|
|
def get_config():
|
|
|
|
def get_config():
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# Try to load from .env file first
|
|
|
|
# Try to load from .env file in the project root
|
|
|
|
|
|
|
|
project_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
|
|
|
|
|
|
|
env_path = os.path.join(project_root, ".env")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.exists(env_path):
|
|
|
|
|
|
|
|
config = Config(env_path)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
# Fallback to default behavior (current working directory)
|
|
|
|
config = Config(".env")
|
|
|
|
config = Config(".env")
|
|
|
|
|
|
|
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
except FileNotFoundError:
|
|
|
|
# If .env doesn't exist, use environment variables
|
|
|
|
# If .env doesn't exist, use environment variables
|
|
|
|
config = Config(environ=os.environ)
|
|
|
|
config = Config(environ=os.environ)
|
|
|
|
|