Files
hufs-notice-crawler/app/config.py
nkey ca460453af
All checks were successful
hufs-notice-crawler-cicd / build_push_deploy (push) Successful in 8m35s
Feat: [main] hufs-notice-crawler CI/CD까지 구현 완료
2026-03-17 17:18:16 +09:00

31 lines
845 B
Python

from functools import lru_cache
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
extra="ignore",
)
app_name: str = "hufs-notice-crawler"
app_env: str = "development"
database_url: str = Field(
default="postgresql+psycopg://postgres:postgres@localhost:5432/hufs_notice_crawler"
)
base_url: str = "https://computer.hufs.ac.kr"
request_timeout_seconds: float = 15.0
max_pages_per_board: int = 5
user_agent: str = (
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
)
@lru_cache(maxsize=1)
def get_settings() -> Settings:
return Settings()