Files
delphi-database/app/config.py
2025-08-10 19:06:21 -05:00

53 lines
1.3 KiB
Python

"""
Delphi Consulting Group Database System - Configuration
"""
from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
"""Application configuration"""
# Application
app_name: str = "Delphi Consulting Group Database System"
app_version: str = "1.0.0"
debug: bool = False
# Database
database_url: str = "sqlite:///./data/delphi_database.db"
# Authentication
secret_key: str = "your-secret-key-change-in-production"
algorithm: str = "HS256"
access_token_expire_minutes: int = 240 # 4 hours
# Admin account settings
admin_username: str = "admin"
admin_password: str = "change-me"
# File paths
upload_dir: str = "./uploads"
backup_dir: str = "./backups"
# Pagination
default_page_size: int = 50
max_page_size: int = 200
# Docker/deployment settings
external_port: Optional[str] = None
allowed_hosts: Optional[str] = None
cors_origins: Optional[str] = None
secure_cookies: bool = False
compose_project_name: Optional[str] = None
# Logging
log_level: str = "INFO"
log_to_file: bool = True
log_rotation: str = "10 MB"
log_retention: str = "30 days"
class Config:
env_file = ".env"
settings = Settings()