feat: mongodb 单后端精简分支 — Beanie 2.x + pymongo async,移除 MySQL/alembic
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
[project]
|
||||
name = "fastapi-template"
|
||||
version = "0.1.0"
|
||||
description = "开箱即用的 FastAPI 模板:MySQL(SQLAlchemy2.0 async) / MongoDB(Beanie) 可切换"
|
||||
description = "FastAPI 模板(MongoDB + Beanie 单后端分支)"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"fastapi>=0.115",
|
||||
"uvicorn[standard]>=0.30",
|
||||
"pydantic>=2.7",
|
||||
"pydantic-settings>=2.4",
|
||||
# MySQL backend
|
||||
"sqlalchemy[asyncio]>=2.0",
|
||||
"aiomysql>=0.2.0",
|
||||
"alembic>=1.13",
|
||||
# MongoDB backend
|
||||
"beanie>=2.0",
|
||||
"pymongo>=4.9",
|
||||
"cryptography>=50.0.0",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
@@ -37,8 +31,6 @@ ignore = [
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"alembic/env.py" = ["E402", "F401"] # 需要先 fileConfig 再 import 应用模块
|
||||
"alembic/versions/*" = ["I001"] # 迁移文件是自动生成物,不整理 import
|
||||
"tests/conftest.py" = ["E402"] # 需要先设环境变量再 import app
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
|
||||
Reference in New Issue
Block a user