📄 config.py 819 bytes Sunday 03:07 📋 Raw

"""
Application Configuration
"""
from pydantic_settings import BaseSettings
from typing import Optional

class Settings(BaseSettings):
"""Application settings loaded from environment"""

# Database
database_url: str = "postgresql://rtsport:rtsport@localhost:5432/rtsport"

# Security
secret_key: str = "dev-secret-key-change-in-production"
access_token_expire_minutes: int = 60 * 24 * 7  # 7 days

# API
api_v1_prefix: str = "/api/v1"
project_name: str = "RTSport API"
debug: bool = True

# CORS
cors_origins: list[str] = ["https://hoffdesk.com", "https://*.hoffdesk.com", "http://localhost:*", "http://127.0.0.1:*"]

class Config:
    env_file = ".env"
    env_file_encoding = "utf-8"

Global settings instance

settings = Settings()