Files
boc/landvex-admin-backend/app/core/config.py
T
Bernt aee0f09db8 landvex: Fixar och tester klara för alla komponenter
- Datafabrik: Dockerfile fix, agentorkestrering fungerar
- Vision: Identify-modell, FAISS, OCR alla testade
- API: Alla 7 integrationstester passerade
- Upplösare: Entitetsupplösning verifierad
2026-07-05 06:41:32 +00:00

53 lines
1.4 KiB
Python

"""
LandveX Admin Backend — Configuration
"""
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing import List, Optional
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
model_config = SettingsConfigDict(
extra="allow",
env_file=".env",
env_file_encoding="utf-8",
case_sensitive=True
)
# Application
APP_NAME: str = "LandveX Admin Backend"
APP_VERSION: str = "1.0.0"
DEBUG: bool = False
# Database
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/landvex_admin"
DATABASE_POOL_SIZE: int = 20
DATABASE_MAX_OVERFLOW: int = 10
# Schema isolation
DEFAULT_TENANT_SCHEMA: str = "public"
TENANT_SCHEMA_PREFIX: str = "tenant_"
# Security
SECRET_KEY: str = "change-me-in-production-landvex-secret-key-2026"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
ALGORITHM: str = "HS256"
# CORS
CORS_ORIGINS: List[str] = ["*"]
CORS_ALLOW_CREDENTIALS: bool = True
CORS_ALLOW_METHODS: List[str] = ["*"]
CORS_ALLOW_HEADERS: List[str] = ["*"]
# Audit logging
AUDIT_LOG_TABLE: str = "audit_logs"
AUDIT_RETENTION_DAYS: int = 365
# Pagination
DEFAULT_PAGE_SIZE: int = 20
MAX_PAGE_SIZE: int = 100
settings = Settings()