release: bump version to 0.3.0

- Refactor Redis backend connection handling and pool management
- Update algorithm implementations with improved type annotations
- Enhance config loader validation with stricter Pydantic schemas
- Improve decorator and middleware error handling
- Expand example scripts with better docstrings and usage patterns
- Add new 00_basic_usage.py example for quick start
- Reorganize examples directory structure
- Fix type annotation inconsistencies across core modules
- Update dependencies in pyproject.toml
This commit is contained in:
2026-03-17 20:55:38 +00:00
parent 492410614f
commit f3453cb0fc
51 changed files with 6507 additions and 166 deletions

View File

@@ -5,9 +5,36 @@ All notable changes to fastapi-traffic will be documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.0] - 2026-03-17
### Added
- Expanded example scripts with improved docstrings and usage patterns
- New `00_basic_usage.py` example for getting started quickly
### Changed
- Refactored Redis backend connection handling for improved reliability
- Updated algorithm implementations with cleaner type annotations
- Improved config loader validation with stricter Pydantic schemas
- Enhanced decorator and middleware error handling
- Reorganized examples directory structure (removed legacy `basic_usage.py`)
### Fixed
- Redis backend connection pool management edge cases
- Type annotation inconsistencies across core modules
## [0.2.1] - 2026-03-12
### Fixed
- Test assertion bug in `test_load_rate_limit_config_from_env_missing_limit` test case within `test_config_loader.py`.
## [0.2.0] - 2026-02-04
### Added
- **Configuration Loader** - Load rate limiting configuration from external files:
- `ConfigLoader` class for loading `RateLimitConfig` and `GlobalConfig`
- Support for `.env` files with `FASTAPI_TRAFFIC_*` prefixed variables
@@ -28,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `httpx` and `pytest-asyncio` as dev dependencies for testing
### Changed
- Improved documentation in README.md and DEVELOPMENT.md
- Added `asyncio_default_fixture_loop_scope` config for pytest-asyncio compatibility
@@ -36,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Initial release.
### Added
- Core rate limiting with `@rate_limit` decorator
- Five algorithms: Token Bucket, Sliding Window, Fixed Window, Leaky Bucket, Sliding Window Counter
- Three storage backends: Memory (default), SQLite (persistent), Redis (distributed)