# ===================================
# Daily Stock Analysis - dependencies
# ===================================

# Core dependencies
python-dotenv>=1.0.0        # Environment variable configuration
tenacity>=8.2.0             # Retry support with exponential backoff
sqlalchemy>=2.0.0           # ORM database access
schedule>=1.2.0             # Scheduled task runner
exchange-calendars>=4.13.0   # Trading calendars; 4.5.x is incompatible with pandas 3 Timedelta "T"

# Data source dependencies, ordered by fallback priority
efinance>=0.5.5             # Priority 0: East Money data source https://github.com/Micro-sheep/efinance
akshare>=1.12.0,<1.20.0     # Priority 1: East Money crawler data source; 1.20 moved file_fold to data and reworked its HTTP layer
# Older mini-racer frozen loaders search the bundle root instead of the package directory.
mini-racer>=0.13.2; platform_system != "Linux"  # Desktop V8 runtime; keep Linux's AkShare dependency unchanged
tushare>=1.4.0              # Priority 2: Tushare Pro API
pytdx>=1.72                 # Priority 2: Tongdaxin quote servers
baostock>=0.8.0             # Priority 3: Baostock data
yfinance>=0.2.0             # Priority 4: Yahoo Finance (Fallback)
# Longbridge 4.x Linux wheels currently require manylinux_2_39; Docker uses bookworm/glibc 2.36.
# Priority 5: Docker/Linux fallback SDK.
longbridge==0.2.74; platform_system == "Linux" and python_version < "3.12"
# Priority 5: Longbridge OpenAPI SDK with OAuth support.
longbridge>=4.0.5,<5; platform_system != "Linux" or python_version >= "3.12"
tickflow>=0.1.24           # TickFlow official SDK; 0.1.24 verified for klines/get batch quotes/universes
futu-api==10.8.6808        # Futu OpenAPI SDK for read-only --portfolio futu holdings import
# The screening engine is maintained in src/services/screening.

# Feishu
lark-oapi>=1.0.0             # Feishu API

# Data processing
pandas>=2.0.0               # Data analysis
pypinyin>=0.50.0            # Name-to-code resolver (pinyin matching)
openpyxl>=3.1.0             # Excel (.xlsx) parsing for import
numpy>=1.24.0               # Numeric computing
fin-primitives>=3.2.0       # Technical indicators (Wilder RSI, TA-Lib compatible) for screening
json-repair>=0.55.1         # JSON repair

# AI analysis
# Pure native HTTPX + SSE transport (OpenAI / Anthropic / Gemini / Azure / Cohere / Vertex / relays) uses httpx below.
# Optional: pip install google-auth only when using Vertex AI with GCP ADC (Express API key mode needs zero extra deps).
PyYAML>=6.0                 # YAML parser for LITELLM_CONFIG / strategies / skills

# Search engines for stock news
tavily-python>=0.3.0        # Tavily Search API (imports tiktoken at runtime)
tiktoken>=0.8.0,<0.12.0     # Transitive dependency pin for tavily-python (pin <0.12 to avoid PyInstaller plugin registration issues, #537)
google-search-results>=2.4.0  # SerpAPI

# Network requests
requests>=2.31.0            # HTTP requests
markdown2>=2.4.0            # Markdown to HTML
imgkit>=1.2.0              # Markdown to image; requires wkhtmltopdf
fake-useragent>=1.4.0       # Random User-Agent support
httpx[socks]                # HTTP client with SOCKS proxy support (native LLM transport & network requests)
dingtalk-stream >= 0.24.3    # DingTalk Stream SDK
wecom-aibot-python-sdk >= 1.0.2    # WeCom AI Bot (smart robot) WebSocket long-connection SDK; optional at runtime (degrades gracefully when missing)
# Database
# SQLite is built into Python and does not need an extra package

# Discord bot
discord.py>=2.0.0              # Discord bot development library
PyNaCl>=1.5.0                  # Discord Interaction/Webhook Ed25519 signature verification

# Web Content Extraction
newspaper3k>=0.2.8          # Article extraction
lxml_html_clean             # Fix for lxml.html.clean ImportError in newer lxml versions

# Report template engine (Report Engine P0)
jinja2>=3.1.0               # Jinja2 template engine for report rendering

# FastAPI Web framework
fastapi>=0.109.0            # Modern Python Web framework
uvicorn[standard]>=0.27.0   # ASGI server
python-multipart>=0.0.6     # FastAPI File/Form upload support
fastapi-guard>=8.1.1        # Optional security middleware (GUARD_ENABLED=true): rate limit, IP allowlist, request screening

# Public macroeconomic tools
# Installed from a pinned GitHub release wheel (sha256 checked); if that release URL is
# removed or replaced, update the URL and hash here or installs of this file will fail.
fxmacrodata-public-client @ https://github.com/fxmacrodata/fxmacrodata-public-client/releases/download/v0.1.0/fxmacrodata_public_client-0.1.0-py3-none-any.whl#sha256=5c60ff217243ff4001f178d4fdd8c3c8ce29001ad1ea0a170ed96606f0dd07c8
