[project] name = "kami_spider" version = "0.1.0" description = "A stateless, production-ready FastAPI-based web service platform hosting multiple independent web applications" readme = "README.md" requires-python = ">=3.13" dependencies = [ "fastapi>=0.120.0", "uvicorn[standard]>=0.38.0", "gunicorn>=23.0.0", "sqlmodel>=0.0.24", "pydantic>=2.12.3", "pydantic-settings>=2.11.0", "redis>=5.2.1", "pymysql>=1.1.1", "cryptography>=46.0.1", "aiomysql>=0.2.0", "alembic>=1.14.0", "python-dotenv>=1.0.1", "opentelemetry-api>=1.38.0", "opentelemetry-sdk>=1.38.0", "opentelemetry-instrumentation-fastapi>=0.59b0", "opentelemetry-instrumentation-sqlalchemy>=0.59b0", "opentelemetry-instrumentation-redis>=0.59b0", "opentelemetry-instrumentation-httpx>=0.59b0", "opentelemetry-exporter-otlp-proto-grpc>=1.38.0", "httpx>=0.28.1", "python-multipart>=0.0.20", "email-validator>=2.3.0", "greenlet>=3.2.4", "orjson>=3.11.4", "brotli>=1.1.0", "psutil>=5.9.0", "pycryptodome>=3.21.0", "curl-cffi>=0.13.0", "fake-useragent>=2.2.0", "opentelemetry-instrumentation-requests>=0.59b0", "ddddocr>=1.5.6", "tenacity>=9.1.2", "pyexecjs>=1.5.1", ] [project.optional-dependencies] dev = [ "pytest>=8.3.4", "pytest-asyncio>=0.24.0", "pytest-cov>=6.0.0", "pytest-mock>=3.14.0", "httpx>=0.28.1", "ruff>=0.8.4", "mypy>=1.14.1", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["apps", "core", "middleware", "observability"] [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] asyncio_mode = "auto" addopts = [ "--strict-markers", "--strict-config", "--cov=.", "--cov-report=term-missing", "--cov-report=html", ] [tool.coverage.run] source = ["."] omit = [ "tests/*", "*/site-packages/*", "*/__pycache__/*", ] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "def __repr__", "raise AssertionError", "raise NotImplementedError", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "class .*\\bProtocol\\):", "@(abc\\.)?abstractmethod", ] [tool.ruff] line-length = 120 target-version = "py313" [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade ] ignore = [ "E501", # line too long (handled by formatter) "B008", # do not perform function calls in argument defaults "W191", # indentation contains tabs ] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] [tool.mypy] python_version = "3.13" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true disallow_incomplete_defs = true check_untyped_defs = true no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_no_return = true strict_equality = true