feat: implement configuration management service with Pydantic Settings (#53)

- Add pydantic-settings dependency
- Create centralized config.py with nested settings groups:
  - DatabaseSettings: PostgreSQL connection validation
  - RedisSettings: Redis connection with defaults
  - PolygonSettings: RPC endpoints with fallback support
  - PolymarketSettings: WebSocket URL and optional API key
  - DiscordSettings: Optional webhook for alerts
  - TelegramSettings: Optional bot token/chat ID for alerts
- Implement singleton pattern with get_settings() and LRU cache
- Add redacted_summary() for logging config without exposing secrets
- Support .env file loading via python-dotenv
- Add comprehensive test suite (26 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Patrick Selamy
2026-01-04 20:12:27 -05:00
co-authored by Claude
parent 704b6d6c29
commit b801c0da5f
4 changed files with 609 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@ dependencies = [
"sqlalchemy>=2.0.0",
"alembic>=1.13.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-dotenv>=1.0.0",
"websockets>=12.0",
"prometheus-client>=0.19.0",