[project] name = "fastapi-traffic" version = "0.1.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] Homepage = "https://github.com/fastapi-traffic/fastapi-traffic" Documentation = "https://github.com/fastapi-traffic/fastapi-traffic#readme" Repository = "https://github.com/fastapi-traffic/fastapi-traffic" Issues = "https://github.com/fastapi-traffic/fastapi-traffic/issues" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["fastapi_traffic"] [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.pyright] pythonVersion = "3.10" typeCheckingMode = "strict" reportMissingTypeStubs = false reportUnknownMemberType = false reportUnknownArgumentType = false reportUnknownVariableType = false reportUnknownParameterType = false reportMissingImports = false [tool.pytest.ini_options] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" testpaths = ["tests"] addopts = "-v --tb=short" [dependency-groups] dev = [ "fastapi>=0.128.0", "httpx>=0.28.1", "pytest>=9.0.2", "pytest-asyncio>=1.3.0", "uvicorn>=0.40.0", ]