19 lines
498 B
Python
19 lines
498 B
Python
# scripts/common/env.py
|
|
from pathlib import Path
|
|
from dotenv import load_dotenv
|
|
from src.utils.logger import log
|
|
|
|
|
|
def setup_environment():
|
|
"""
|
|
Carga variables de entorno desde config/secrets.env
|
|
"""
|
|
env_path = Path(__file__).parent.parent.parent / "config" / "secrets.env"
|
|
|
|
if not env_path.exists():
|
|
log.warning(f"⚠️ Archivo .env no encontrado: {env_path}")
|
|
return
|
|
|
|
load_dotenv(dotenv_path=env_path)
|
|
log.success("✓ Variables de entorno cargadas")
|