feat: mysql 单后端精简分支 — SQLAlchemy 2.0 async + aiomysql + alembic

This commit is contained in:
2026-08-21 21:30:45 +08:00
parent 981bee5a46
commit 35bdc60b77
12 changed files with 31 additions and 278 deletions

View File

@@ -1,21 +1,17 @@
[project]
name = "fastapi-template"
version = "0.1.0"
description = "开箱即用的 FastAPI 模板MySQL(SQLAlchemy2.0 async) / MongoDB(Beanie) 可切换"
description = "FastAPI 模板MySQL + SQLAlchemy 2.0 async 单后端分支)"
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",
"cryptography>=43", # aiomysql 连 MySQL8 认证需要
]
[dependency-groups]