Update docs to be more readable and add uv instructions
Rewrote README and DEVELOPMENT.md to sound less robotic. Added changelog documenting the new test suite and other recent changes.
This commit is contained in:
42
CHANGELOG.md
Normal file
42
CHANGELOG.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Changelog
|
||||
|
||||
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).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- `get_stats()` method to `MemoryBackend` for consistency with `RedisBackend`
|
||||
- Comprehensive test suite with 134 tests covering:
|
||||
- All five rate limiting algorithms with timing and concurrency tests
|
||||
- Backend tests for Memory and SQLite with edge cases
|
||||
- Decorator and middleware integration tests
|
||||
- Exception handling and configuration validation
|
||||
- End-to-end integration tests with FastAPI apps
|
||||
- `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
|
||||
|
||||
## [0.1.0] - 2025-01-09
|
||||
|
||||
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)
|
||||
- Middleware support for global rate limiting via `RateLimitMiddleware`
|
||||
- Dependency injection support with `RateLimitDependency`
|
||||
- Custom key extractors for flexible rate limit grouping (by IP, API key, user, etc.)
|
||||
- Configurable exemptions with `exempt_when` callback
|
||||
- Rate limit headers (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`)
|
||||
- `RateLimitExceeded` exception with `retry_after` and `limit_info`
|
||||
- Full async support throughout
|
||||
- Strict type hints (pyright/mypy compatible)
|
||||
- Redis backend with Lua scripts for atomic operations
|
||||
- SQLite backend with WAL mode and connection pooling
|
||||
- Memory backend with LRU eviction and TTL cleanup
|
||||
Reference in New Issue
Block a user