-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
29 lines (19 loc) · 840 Bytes
/
config.py
File metadata and controls
29 lines (19 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Runtime configuration shared across StockBot modules."""
from __future__ import annotations
import os
from datetime import datetime
from pathlib import Path
from typing import Final, Optional
from dotenv import load_dotenv
load_dotenv()
DB_REMOTE: Optional[str] = os.getenv("DB_REMOTE") or os.getenv("DB_DSN")
WEEKLY_BUDGET: float = float(os.getenv("WEEKLY_BUDGET", "50"))
ANALYSIS_DAY: str = os.getenv("ANALYSIS_DAY", "monday")
ANALYSIS_HOUR: str = os.getenv("ANALYSIS_HOUR", "09:00")
START_DATE: Final[datetime] = datetime(2025, 8, 11, 9, 0)
BASE_DIR = Path(__file__).resolve().parent
OUTPUT_DIR = BASE_DIR / "output"
OUTPUT_DIR.mkdir(exist_ok=True)
_timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
REPORT_CSV_PATH = OUTPUT_DIR / f"weekly_plan_{_timestamp}.csv"
NEWS_LOG_PATH = OUTPUT_DIR / f"news_log_{_timestamp}.txt"