5 Commits

Author SHA1 Message Date
17e5a551e1 feat: migrate to Pydantic V2 and implement rate limiting middleware
- Migrate settings.py to Pydantic V2 (SettingsConfigDict, validation_alias)
- Update config models to use @field_validator with @classmethod
- Replace deprecated datetime.utcnow() with datetime.now(timezone.utc)
- Migrate FastAPI app from @app.on_event to lifespan context manager
- Implement comprehensive rate limiting middleware with:
  * Endpoint-specific rate limits (login: 5/min, register: 3/min)
  * IP-based and user-based tracking
  * Authenticated user multiplier (2x limits)
  * Bypass paths for health, docs, static, websocket endpoints
  * Rate limit headers in responses
- Add 13 comprehensive tests for rate limiting (all passing)
- Update instructions.md to mark completed tasks
- Fix asyncio.create_task usage in anime_service.py

All 714 tests passing. No deprecation warnings.
2025-10-23 22:03:15 +02:00
9a64ca5b01 cleanup 2025-10-23 18:10:34 +02:00
92795cf9b3 Improve docs and security defaults 2025-10-22 15:22:58 +02:00
80507119b7 fix: resolve line length violations (80+ characters)
- refactor src/cli/Main.py: split long logging config, user prompts, and method calls
- refactor src/config/settings.py: break long Field definitions into multiple lines
- refactor src/core/providers/enhanced_provider.py: split provider lists, headers, and long f-strings
- refactor src/core/providers/streaming/voe.py: format HTTP header setup
- update QualityTODO.md: mark all line length violations as completed

All files now comply with 88-character line limit. Code readability improved with
better-structured multi-line statements and intermediate variables for complex expressions.
2025-10-22 12:16:41 +02:00
7b933b6cdb test and move of controllers 2025-10-12 19:54:44 +02:00