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

@@ -1,12 +1,20 @@
[project]
name = "fastapi-traffic"
version = "0.2.0"
version = "0.3.0"
description = "Production-grade rate limiting for FastAPI with multiple algorithms and backends"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "Apache-2.0" }
authors = [{ name = "zanewalker", email="bereckobrian@gmail.com" }]
keywords = ["fastapi", "rate-limit", "rate-limiting", "throttle", "api", "redis", "sqlite"]
authors = [{ name = "zanewalker", email = "bereckobrian@gmail.com" }]
keywords = [
"fastapi",
"rate-limit",
"rate-limiting",
"throttle",
"api",
"redis",
"sqlite",
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: FastAPI",
@@ -21,10 +29,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.0",
"starlette>=0.27.0",
]
dependencies = ["pydantic>=2.0", "starlette>=0.27.0"]
[project.optional-dependencies]
redis = ["redis>=5.0.0"]
@@ -41,6 +46,13 @@ dev = [
"fastapi>=0.100.0",
"uvicorn>=0.29.0",
]
docs = [
"sphinx>=7.0.0",
"furo>=2024.0.0",
"sphinx-copybutton>=0.5.0",
"myst-parser>=2.0.0",
"sphinx-design>=0.5.0",
]
[project.urls]
Documentation = "https://gitlab.com/zanewalker/fastapi-traffic#readme"
@@ -71,23 +83,23 @@ line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RUF", # Ruff-specific rules
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B904", # raise without from inside except
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B904", # raise without from inside except
]
[tool.ruff.lint.isort]
@@ -103,17 +115,21 @@ known-first-party = ["fastapi_traffic"]
pythonVersion = "3.10"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportUnknownMemberType = true
reportUnknownArgumentType = true
reportUnknownVariableType = true
reportUnknownParameterType = true
reportMissingImports = false
reportUnusedFunction = false
reportUnusedFunction = true
reportInvalidTypeArguments = true
reportGeneralTypeIssues = true
[[tool.pyright.executionEnvironments]]
root = "tests"
reportUnusedFunction = false
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
addopts = "-v --tb=short"
@@ -126,4 +142,6 @@ dev = [
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"uvicorn>=0.40.0",
"ruff>=0.9.9",
"pyright>=1.1.395",
]