mirror of
https://github.com/marcogll/telegram_expenses_controller.git
synced 2026-01-13 13:25:15 +00:00
feat: translate comments, docstrings, and log messages to Spanish.
This commit is contained in:
@@ -1,36 +1,36 @@
|
||||
"""
|
||||
Configuration loader.
|
||||
Cargador de configuración.
|
||||
|
||||
Loads environment variables from a .env file and makes them available as a Config object.
|
||||
Carga las variables de entorno desde un archivo .env y las pone a disposición como un objeto Config.
|
||||
"""
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file in the project root
|
||||
# Note: The path is relative to the file's location in the final `app` directory
|
||||
# Cargar variables de entorno desde el archivo .env en la raíz del proyecto
|
||||
# Nota: La ruta es relativa a la ubicación del archivo en el directorio final `app`
|
||||
dotenv_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), '.env')
|
||||
if os.path.exists(dotenv_path):
|
||||
load_dotenv(dotenv_path)
|
||||
|
||||
class Config:
|
||||
"""
|
||||
Holds the application's configuration.
|
||||
Contiene la configuración de la aplicación.
|
||||
"""
|
||||
# Telegram Bot Token
|
||||
# Token del Bot de Telegram
|
||||
TELEGRAM_TOKEN = os.getenv("TELEGRAM_TOKEN")
|
||||
|
||||
# OpenAI API Key
|
||||
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
# Supergroup ID for the bot
|
||||
# ID del Supergrupo para el bot
|
||||
SUPERGROUP_ID = os.getenv("SUPERGROUP_ID")
|
||||
|
||||
# Database URL (e.g., "sqlite:///expenses.db")
|
||||
# URL de la Base de Datos (ej., "sqlite:///expenses.db")
|
||||
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///../database.db")
|
||||
|
||||
# Log level
|
||||
# Nivel de registro
|
||||
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
|
||||
|
||||
|
||||
# Create a single instance of the configuration
|
||||
# Crear una única instancia de la configuración
|
||||
config = Config()
|
||||
|
||||
Reference in New Issue
Block a user