Files
web-inspector/backend/app/core/config.py
jungwoo choi 8326c84be9 feat: 3-mode inspection with tabbed UI + batch upload
- Add batch inspection backend (multipart upload, SSE streaming, MongoDB)
- Add tabbed UI (single page / site crawling / batch upload) on home and history pages
- Add batch inspection progress, result pages with 2-panel layout
- Rename "사이트 전체" to "사이트 크롤링" across codebase
- Add python-multipart dependency for file upload
- Consolidate nginx SSE location for all inspection types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:15:27 +09:00

44 lines
941 B
Python

"""
Application configuration from environment variables.
"""
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
# MongoDB
MONGODB_URL: str = "mongodb://admin:password123@localhost:27022/"
DB_NAME: str = "web_inspector"
# Redis
REDIS_URL: str = "redis://localhost:6392"
# Inspection
URL_FETCH_TIMEOUT: int = 10
CATEGORY_TIMEOUT: int = 60
MAX_HTML_SIZE: int = 10485760 # 10MB
# Site inspection
SITE_MAX_PAGES: int = 500
SITE_MAX_DEPTH: int = 2
SITE_CONCURRENCY: int = 8
# Batch inspection
BATCH_MAX_URLS: int = 200
BATCH_CONCURRENCY: int = 8
# Application
PROJECT_NAME: str = "Web Inspector API"
class Config:
env_file = ".env"
case_sensitive = True
@lru_cache()
def get_settings() -> Settings:
return Settings()