Initial commit: SYNC_API project
This commit is contained in:
1
sync_api/config/__init__.py
Normal file
1
sync_api/config/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# Config module initialization
|
||||
BIN
sync_api/config/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
sync_api/config/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
sync_api/config/__pycache__/settings.cpython-312.pyc
Normal file
BIN
sync_api/config/__pycache__/settings.cpython-312.pyc
Normal file
Binary file not shown.
45
sync_api/config/settings.py
Normal file
45
sync_api/config/settings.py
Normal file
@@ -0,0 +1,45 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Configuración de base de datos CONTROLDESK
|
||||
database_server: str = "localhost"
|
||||
database_name: str
|
||||
database_user: str
|
||||
database_password: str
|
||||
database_driver: str = "ODBC Driver 17 for SQL Server"
|
||||
database_port: int = 1433
|
||||
|
||||
# Configuración de servidor de respaldos
|
||||
backup_server: str
|
||||
backup_database: str
|
||||
backup_user: str
|
||||
backup_password: str
|
||||
backup_driver: str = "ODBC Driver 17 for SQL Server"
|
||||
backup_port: int = 1433
|
||||
|
||||
# Configuración de la API
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
debug_mode: bool = True
|
||||
|
||||
# Configuración de logging
|
||||
log_level: str = "INFO"
|
||||
|
||||
# Configuración de caché
|
||||
cache_ttl: int = 300
|
||||
enable_cache: bool = False
|
||||
|
||||
# Configuración de seguridad
|
||||
api_username: str = "admin"
|
||||
api_password: str = "password"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
# Instancia global de configuración
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user