42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
|
|
"""
|
||
|
|
Configuration Module
|
||
|
|
Handles environment variables and application settings
|
||
|
|
"""
|
||
|
|
|
||
|
|
import os
|
||
|
|
from typing import List
|
||
|
|
from pydantic_settings import BaseSettings
|
||
|
|
|
||
|
|
|
||
|
|
class Settings(BaseSettings):
|
||
|
|
"""Application settings loaded from environment variables"""
|
||
|
|
|
||
|
|
# Database
|
||
|
|
DATABASE_URL: str = "postgresql://bmc_hub:bmc_hub@localhost:5432/bmc_hub"
|
||
|
|
|
||
|
|
# API
|
||
|
|
API_HOST: str = "0.0.0.0"
|
||
|
|
API_PORT: int = 8000
|
||
|
|
|
||
|
|
# Security
|
||
|
|
SECRET_KEY: str = "dev-secret-key-change-in-production"
|
||
|
|
ALLOWED_ORIGINS: List[str] = ["http://localhost:8000", "http://localhost:3000"]
|
||
|
|
|
||
|
|
# Logging
|
||
|
|
LOG_LEVEL: str = "INFO"
|
||
|
|
LOG_FILE: str = "logs/app.log"
|
||
|
|
|
||
|
|
# e-conomic Integration
|
||
|
|
ECONOMIC_API_URL: str = "https://restapi.e-conomic.com"
|
||
|
|
ECONOMIC_APP_SECRET_TOKEN: str = ""
|
||
|
|
ECONOMIC_AGREEMENT_GRANT_TOKEN: str = ""
|
||
|
|
ECONOMIC_READ_ONLY: bool = True
|
||
|
|
ECONOMIC_DRY_RUN: bool = True
|
||
|
|
|
||
|
|
class Config:
|
||
|
|
env_file = ".env"
|
||
|
|
case_sensitive = True
|
||
|
|
|
||
|
|
|
||
|
|
settings = Settings()
|