Files
fastapi-traffic/pyproject.toml
zanewalker f3453cb0fc 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
2026-03-17 21:04:34 +00:00

148 lines
3.6 KiB
TOML

[project]
name = "fastapi-traffic"
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",
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: FastAPI",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = ["pydantic>=2.0", "starlette>=0.27.0"]
[project.optional-dependencies]
redis = ["redis>=5.0.0"]
fastapi = ["fastapi>=0.100.0"]
all = ["redis>=5.0.0", "fastapi>=0.100.0"]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.0.0",
"httpx>=0.27.0",
"ruff>=0.4.0",
"pyright>=1.1.350",
"redis>=5.0.0",
"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"
Repository = "https://gitlab.com/zanewalker/fastapi-traffic"
Issues = "https://gitlab.com/zanewalker/fastapi-traffic/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["fastapi_traffic"]
[tool.hatch.build.targets.sdist]
exclude = [
".venv",
".cache",
".pytest_cache",
".ruff_cache",
".qodo",
".vscode",
"*.db",
]
[tool.ruff]
target-version = "py310"
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
]
ignore = [
"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]
known-first-party = ["fastapi_traffic"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["ARG001", "ARG002"]
"examples/*" = ["ARG001"]
"fastapi_traffic/__init__.py" = ["F401"]
"fastapi_traffic/backends/__init__.py" = ["F401"]
[tool.pyright]
pythonVersion = "3.10"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
reportUnknownMemberType = true
reportUnknownArgumentType = true
reportUnknownVariableType = true
reportUnknownParameterType = true
reportMissingImports = false
reportUnusedFunction = true
reportInvalidTypeArguments = true
reportGeneralTypeIssues = true
[[tool.pyright.executionEnvironments]]
root = "tests"
reportUnusedFunction = false
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
addopts = "-v --tb=short"
[dependency-groups]
dev = [
"black>=25.12.0",
"fastapi>=0.128.0",
"httpx>=0.28.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"uvicorn>=0.40.0",
"ruff>=0.9.9",
"pyright>=1.1.395",
]