Files
meijiaka-zy/python-api/pyproject.toml
T
小鱼开发 de7a6b734f chore(release): bump to v1.5.15
- 统一版本号管理(VERSION + scripts/bump-version.py)
- 添加 GitLab CI/CD 前端多平台构建配置
- 替换应用图标为品牌 logo
- 清理无效文件(tauri.svg, vite.svg, bg-config.json, audio/presets, .DS_Store)
- 修复 ESLint 错误和全部 warnings
- 清理 console.warn,保留 console.error
- 更新 Cargo.toml 元数据(description + authors)
- 更新 .gitignore(dist/, src-tauri/target/, binaries/)
- authStore appVersion 改为动态获取(getVersion)
- 修复 login 错误处理
- 将 FFmpeg sidecar 二进制移出 Git 跟踪(CI 构建时准备)
2026-05-14 23:32:45 +08:00

136 lines
3.2 KiB
TOML

[project]
name = "meijiaka-ai-api"
version = "1.5.15"
description = "美家卡智影 - AI 视频创作后端 API"
authors = [{ name = "Meijiaka Team" }]
readme = "README.md"
requires-python = ">=3.13"
license = { text = "MIT" }
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]
dependencies = [
# Web 框架 (FastAPI 0.116+ 修复 Starlette 安全漏洞)
"fastapi>=0.136.1",
"uvicorn[standard]~=0.32.0",
"python-multipart~=0.0.20",
# 认证 & 安全
"passlib[bcrypt]~=1.7.4",
"bcrypt~=4.2.0",
# 数据库
"sqlalchemy[asyncio]~=2.0.36",
"asyncpg~=0.30.0",
"psycopg2-binary~=2.9.10",
"alembic~=1.14.0",
# 缓存 & 任务队列
"redis~=5.2.0",
# 配置 & 验证
"pydantic~=2.9.0",
"pydantic-settings~=2.6.0",
# AI / LLM
"openai~=1.58.0",
# 重试 & 容错
"tenacity~=9.0.0",
# 火山方舟官方 SDK(可选,如不需要可注释掉)
"volcengine-python-sdk[ark]~=5.0.0",
# HTTP 客户端
"httpx~=0.28.0",
"aiohttp>=3.13.4", # 安全修复:修复 CVE-2025-XXXX 系列漏洞
# 对象存储
"qiniu~=7.13.0",
# 工具
"pyjwt~=2.10.0",
"pyyaml~=6.0.2",
"orjson>=3.11.0", # 安全修复:修复 CVE-2025-XXXX
# 音频时长探测(TTS 扣费用)
"mutagen~=1.47.0",
]
[project.optional-dependencies]
dev = [
"pytest~=8.3.0",
"pytest-asyncio~=0.24.0",
"pytest-cov~=6.0.0",
"ruff~=0.8.0",
"black~=24.10.0",
"mypy~=1.14.0",
"bandit[toml]~=1.8.0", # 安全扫描
"pip-audit~=2.7.0", # 漏洞检测
"pre-commit~=4.0.0", # Git 钩子
]
[project.scripts]
meijiaka-api = "app.main:main"
[tool.setuptools]
packages = ["app"]
[tool.black]
line-length = 100
target-version = ["py313"]
[tool.ruff]
line-length = 100
target-version = "py313"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM"]
ignore = ["E501", "E402", "N802", "N803", "N806", "N815", "B008", "B904"]
[tool.mypy]
python_version = "3.13"
strict = false
warn_return_any = false
warn_unused_configs = true
ignore_missing_imports = true
# 逐步修复历史遗留问题
warn_no_return = false
check_untyped_defs = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
# ========== 重构防护网:新代码严格模式 ==========
[[tool.mypy.overrides]]
module = ["app.schemas.*", "app.crud.*", "app.scheduler.handlers.*"]
strict = true
warn_return_any = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
# Redis 客户端 typing 问题(Awaitable[T] | T),暂不严格检查
[[tool.mypy.overrides]]
module = ["app.scheduler.registry", "app.scheduler.slot_manager"]
strict = false
check_untyped_defs = false
disallow_untyped_defs = false
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.bandit]
exclude_dirs = ["tests", "scripts"]
# B101: assert 使用 — 非安全问题,纯代码规范,跳过
skips = ["B101"]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]