Files
AlphaPulse/backend/src/alphapulse/core/config.py
T
eezd aabc81ba5b Initial AlphaPulse implementation: news crawler and Binance klines
- Backend (FastAPI, SQLAlchemy 2, Alembic): single-admin cookie auth,
  news/crawler/market APIs with SSE and WebSocket streaming
- Crawler (Scrapy + Scrapy-Redis): wscn_news, wscn_live, cls_depth,
  cls_telegraph spiders, idempotent upserts with revisions, raw response
  archiving, per-source subprocess supervision, restart and backoff
- Market worker: full-history Binance spot/USD-M kline backfill,
  realtime WS stream, hourly and on-reconnect catch-up
- Frontend (Vue 3, Element Plus, UnoCSS, KLineChart): news feed,
  crawler console with live logs, Binance-style chart page
- Deploy: docker compose, nginx site, migrate and daily backup scripts
2026-10-13 13:32:55 +08:00

21 lines
492 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")
database_url: str
redis_url: str
jwt_secret: str
admin_username: str
admin_password_hash: str = ""
jwt_expire_days: int = 7
@lru_cache
def get_settings() -> Settings:
return Settings()