This release brings significant enhancements to fastapicap, focusing on improved flexibility, robustness, and comprehensive documentation.
New Features:
- Advanced Guide: Added a comprehensive guide for advanced usage, focusing on dependency injection for rate limiting.
- Middleware Support: Introduced middleware support for global rate limiting.
- Tox Integration: Added tox configuration for improved testing across different Python environments.
Improvements:
- Enhanced Default Key Function: The default key function now uses endpoint metadata for better identification.
- Clearer Limiter Identification: Limiter instances now append their strategy name to Redis keys for easier distinction and debugging
Bug Fixes:
- Distributed System Compatibility: Fixed a critical bug by removing _instance_id from limiters, resolving issues when applying multiple limiters in distributed environments.
- Middleware Test Coverage: Added comprehensive tests for the new RateLimitMiddleware to ensure its stability and correctness.
- Test Reliability: Addressed and fixed issues in unit tests related to request scope and ensured distinct prefixes are used in tests to prevent conflicts.
Documentation & Formatting:
- Updated docs/quickstart.md with the latest information and best practices.
- Revised README.md for clarity and accuracy.
- Applied general code formatting and style consistency improvements.