diff --git a/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate.md b/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate.md new file mode 100644 index 0000000..7fa4b5c --- /dev/null +++ b/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate.md @@ -0,0 +1,25 @@ +--- +title: Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate +type: decision +permalink: main/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/python-后端使用-fast-api-、-sqlalchemy-2-和-procrastinate +stable_id: 14264eb0-d710-4cd5-b6fa-b8defcf914ba +scope: project +memory_type: decision +project_id: e3c7b74e-4a45-4380-a6d1-b1807e184d4a +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 1 +request_id: sitedemolition-python-frameworks-20261029 +created_at: '2026-10-29T07:45:35.887236+00:00' +updated_at: '2026-10-29T07:45:35.887236+00:00' +tags: +- stack +- fastapi +- procrastinate +--- + +后端使用 Python。接口使用 FastAPI,由 Uvicorn 运行。数据库访问使用 SQLAlchemy 2,结构变更使用 Alembic。定时获取和任务排队使用 Procrastinate,任务记录在 PostgreSQL 中。 + +用户提交任务后,接口写入任务并返回。获取、入库和导出由 worker 执行,可以同时运行多个。访问数据库和写结果文件使用同步函数。 + +正文与本地 Docs/decisions.md 的技术栈一节一致。 \ No newline at end of file