Files
MemRelay/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate.md
T
memrelay 1d2eefc0ad create: Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate
MemRelay-Operation: memory-save:sitedemolition-python-frameworks-20261029
MemRelay-Resource: 14264eb0-d710-4cd5-b6fa-b8defcf914ba
2026-10-29 15:45:39 +08:00

1.1 KiB

title, type, permalink, stable_id, scope, memory_type, project_id, usage_profile_id, status, revision, request_id, created_at, updated_at, tags
title type permalink stable_id scope memory_type project_id usage_profile_id status revision request_id created_at updated_at tags
Python 后端使用 FastAPI、SQLAlchemy 2 和 Procrastinate decision main/projects/e3c7b74e-4a45-4380-a6d1-b1807e184d4a/python-后端使用-fast-api-、-sqlalchemy-2-和-procrastinate 14264eb0-d710-4cd5-b6fa-b8defcf914ba project decision e3c7b74e-4a45-4380-a6d1-b1807e184d4a 0c9feb46-d06e-43cd-9ef0-c5813c84a998 active 1 sitedemolition-python-frameworks-20261029 2026-10-29T07:45:35.887236+00:00 2026-10-29T07:45:35.887236+00:00
stack
fastapi
procrastinate

后端使用 Python。接口使用 FastAPI,由 Uvicorn 运行。数据库访问使用 SQLAlchemy 2,结构变更使用 Alembic。定时获取和任务排队使用 Procrastinate,任务记录在 PostgreSQL 中。

用户提交任务后,接口写入任务并返回。获取、入库和导出由 worker 执行,可以同时运行多个。访问数据库和写结果文件使用同步函数。

正文与本地 Docs/decisions.md 的技术栈一节一致。