Primer commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Calcular ruta absoluta al .env
|
||||
ENV_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'config', '.env'))
|
||||
|
||||
# Cargar el .env si existe
|
||||
if os.path.exists(ENV_PATH):
|
||||
load_dotenv(ENV_PATH)
|
||||
else:
|
||||
raise FileNotFoundError(f"No se encontró el archivo .env en {ENV_PATH}")
|
||||
|
||||
# Exponer la ruta como variable accesible al importar `entrypoint`
|
||||
__all__ = ['ENV_PATH']
|
||||
Reference in New Issue
Block a user