4 Commits

7 changed files with 58 additions and 15 deletions

View File

@@ -5,6 +5,19 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.2] - 2026-03-19
### Changed
- Applied ruff and black code formatting
## [0.3.1] - 2026-03-19
### Changed
- Updated documentation version references to match release version
- Synchronized docs/changelog.rst with CHANGELOG.md
## [0.3.0] - 2026-03-17 ## [0.3.0] - 2026-03-17
### Added ### Added

View File

@@ -6,22 +6,54 @@ All notable changes to FastAPI Traffic are documented here.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.1.0/>`_, 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>`_. and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
[0.2.1] - 2026-03-07 [0.3.2] - 2026-03-19
-------------------- --------------------
Changed Changed
^^^^^^^ ^^^^^^^
- Improved config loader validation using Pydantic schemas - Applied ruff and black code formatting
- Added pydantic>=2.0 as a core dependency
- Fixed sync wrapper in decorator to properly handle rate limiting
- Updated pyright settings for stricter type checking
- Fixed repository URL in pyproject.toml
Removed [0.3.1] - 2026-03-19
--------------------
Changed
^^^^^^^ ^^^^^^^
- Removed unused main.py - Updated documentation version references to match release version
- Synchronized docs/changelog.rst with CHANGELOG.md
[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 [0.2.0] - 2026-02-04
-------------------- --------------------

View File

@@ -13,8 +13,8 @@ sys.path.insert(0, str(Path(__file__).parent.parent.resolve()))
project = "fastapi-traffic" project = "fastapi-traffic"
copyright = "2026, zanewalker" copyright = "2026, zanewalker"
author = "zanewalker" author = "zanewalker"
release = "0.2.1" release = "0.3.2"
version = "0.2.1" version = "0.3.2"
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
extensions = [ extensions = [

View File

@@ -84,7 +84,7 @@ After installation, you can verify everything is working:
import fastapi_traffic import fastapi_traffic
print(fastapi_traffic.__version__) print(fastapi_traffic.__version__)
# Should print: 0.2.1 # Should print: 0.3.2
Or check which backends are available: Or check which backends are available:

View File

@@ -104,7 +104,6 @@ def example_dotenv_file() -> RateLimitConfig:
env_path = f.name env_path = f.name
try: try:
config = load_rate_limit_config(env_path) config = load_rate_limit_config(env_path)
print(f"From .env: limit={config.limit}, algorithm={config.algorithm}") print(f"From .env: limit={config.limit}, algorithm={config.algorithm}")
print(f"Burst size: {config.burst_size}") print(f"Burst size: {config.burst_size}")
@@ -147,7 +146,6 @@ def example_json_file() -> RateLimitConfig:
json_path = f.name json_path = f.name
try: try:
config = load_rate_limit_config(json_path) config = load_rate_limit_config(json_path)
print(f"From JSON: limit={config.limit}, window={config.window_size}s") print(f"From JSON: limit={config.limit}, window={config.window_size}s")
print(f"Algorithm: {config.algorithm.value}") print(f"Algorithm: {config.algorithm.value}")

View File

@@ -20,7 +20,7 @@ from fastapi_traffic.exceptions import (
RateLimitExceeded, RateLimitExceeded,
) )
__version__ = "0.3.0" __version__ = "0.3.2"
__all__ = [ __all__ = [
"Algorithm", "Algorithm",
"Backend", "Backend",

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "fastapi-traffic" name = "fastapi-traffic"
version = "0.3.0" version = "0.3.2"
description = "Production-grade rate limiting for FastAPI with multiple algorithms and backends" description = "Production-grade rate limiting for FastAPI with multiple algorithms and backends"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"