Files
fastapi-traffic/pyproject.toml

129 lines
3.3 KiB
TOML

[project]
name = "fastapi-traffic"
version = "0.2.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 = [
"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",
]
[project.urls]
Documentation = "https://gitlab.com/zanewalker/fastapi-traffic#readme"
Repository = "https://github.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 = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportMissingImports = false
reportUnusedFunction = false
reportInvalidTypeArguments = false
reportGeneralTypeIssues = 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",
]