- T55: Setup APScheduler with AsyncIOScheduler and @scheduled_job decorator - T56: Implement hourly usage stats sync from OpenRouter API - T57: Implement daily API key validation job - T58: Implement weekly cleanup job for old usage stats - Add usage_stats_retention_days config option - Integrate scheduler with FastAPI lifespan events - Add 26 unit tests for scheduler, sync, and cleanup tasks - Add apscheduler to requirements.txt The background tasks now automatically: - Sync usage stats every hour from OpenRouter - Validate API keys daily at 2 AM UTC - Clean up old data weekly on Sunday at 3 AM UTC
34 lines
587 B
Plaintext
34 lines
587 B
Plaintext
# ===========================================
|
|
# OpenRouter API Key Monitor - Dependencies
|
|
# ===========================================
|
|
|
|
# Web Framework
|
|
fastapi==0.104.1
|
|
uvicorn[standard]==0.24.0
|
|
python-multipart==0.0.6
|
|
|
|
# Database
|
|
sqlalchemy==2.0.23
|
|
alembic==1.12.1
|
|
|
|
# Validation & Settings
|
|
pydantic==2.5.0
|
|
pydantic-settings==2.1.0
|
|
|
|
# Authentication & Security
|
|
python-jose[cryptography]==3.3.0
|
|
passlib[bcrypt]==1.7.4
|
|
cryptography==41.0.7
|
|
|
|
# HTTP Client
|
|
httpx==0.25.2
|
|
|
|
# Testing
|
|
pytest==7.4.3
|
|
pytest-asyncio==0.21.1
|
|
pytest-cov==4.1.0
|
|
httpx==0.25.2
|
|
|
|
# Task Scheduling
|
|
apscheduler==3.10.4
|