Files
kami_spider_monorepo/pyproject.toml
danial 6c768b6e7b feat(jd): 添加京东相关路由及苹果权益充值功能
- 新增jd模块基础路由,整合app_store和payment子路由
- 实现苹果权益充值接口,支持苹果、携程及沃尔玛多个渠道
- 实现卡号密码查询接口,支持不同类别订单查询
- 新增短信认证相关接口,实现短信验证码发送及短信登录
- 新增商品管理接口,支持SKU详情查询及账号类下单功能
- 新增订单管理接口,实现订单删除功能
- 实现支付相关接口,增加刷新支付参数功能
- 定义完整请求及响应数据模型,确保接口数据规范
- 编写AppStoreSpider类,封装苹果应用内订单处理逻辑
- 引入多种代理池及请求重试机制,增强接口稳定性
- 添加详细日志记录,便于请求追踪与错误排查
2025-11-03 19:35:39 +08:00

130 lines
3.0 KiB
TOML

[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