40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
"""
|
|
Core configuration settings for the Loan Operations API.
|
|
"""
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings."""
|
|
|
|
# API Configuration
|
|
api_title: str = "Loan Operations API"
|
|
api_description: str = "A comprehensive API for managing loan operations"
|
|
api_version: str = "1.0.0"
|
|
|
|
# Server Configuration
|
|
host: str = Field(default="0.0.0.0", description="Server host")
|
|
port: int = Field(default=8000, description="Server port")
|
|
debug: bool = Field(default=False, description="Debug mode")
|
|
|
|
# API Configuration
|
|
api_v1_prefix: str = "/api/v1"
|
|
|
|
# CORS Configuration
|
|
allowed_origins: list[str] = Field(
|
|
default=["*"],
|
|
description="Allowed CORS origins"
|
|
)
|
|
|
|
# Logging Configuration
|
|
log_level: str = Field(default="INFO", description="Logging level")
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
# Global settings instance
|
|
settings = Settings()
|