Files
AlphaPulse/backend/src/alphapulse/core/config.py
T
eezd 89c729092c
Development CI / check-and-build (push) Successful in 2m54s
GitHub Git mirror / mirror (push) Successful in 9s
Development CI / deploy-development (push) Failing after 4m24s
Add resumable US policy news collectors and provenance
Collect official crypto and US policy documents with deterministic screening, full bodies and attachments, bounded retries, and durable history cursors. Preserve publication precision and source identity while keeping new collectors disabled.

Add real Congress, GovInfo, DOJ and Federal Register fixtures, offline capture replay, isolated database validation, and rollout instructions. Validate 982 backend tests, frontend checks, and 57 deployment control tests.
2026-11-04 21:41:04 +08:00

28 lines
731 B
Python

from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
# 容器内由 compose 的 env_file 注入;只有一套配置,见仓库根目录 .env
model_config = SettingsConfigDict(extra="ignore")
congress_api_key: str = ""
crawler_contact_email: str = ""
searxng_url: str = "http://searxng:8080"
database_url: str
redis_url: str
jwt_secret: str
admin_username: str
admin_password_hash: str = ""
login_captcha_enabled: bool = False
jwt_expire_days: int = 7
# Fernet 密钥,加密存库的第三方 API key
secret_encryption_key: str
@lru_cache
def get_settings() -> Settings:
return Settings()