Files
FilesReadSystem/backend/requirements.txt
dj be302839ee feat: 添加文档转PDF转换功能
- 后端添加 PDF 转换服务,支持 Word(docx)、Excel(xlsx)、文本(txt)、Markdown(md) 格式转换为 PDF
- 使用 reportlab 库,支持中文字体(simhei.ttf)
- 添加 FastAPI 接口:POST /api/v1/pdf/convert 单文件转换,POST /api/v1/pdf/convert/batch 批量转换
- 前端添加 PdfConverter 页面,支持拖拽上传、转换进度显示、批量下载
- 转换流程:所有格式先转为 Markdown,再通过 Markdown 转 PDF,保证输出一致性
- DOCX 解析使用 zipfile 直接读取 XML,避免 python-docx 的兼容性问题的
2026-04-20 00:00:30 +08:00

60 lines
1.6 KiB
Plaintext

# ============================================================
# 基于大语言模型的文档理解与多源数据融合系统
# Python 依赖清单
# ============================================================
# ==================== Web 框架 ====================
fastapi[all]==0.104.1
uvicorn[standard]==0.24.0
python-multipart==0.0.6
# ==================== 数据验证与配置 ====================
pydantic==2.5.0
pydantic-settings==2.1.0
python-dotenv==1.0.0
# ==================== 数据库 - MySQL (结构化数据) ====================
pymysql==1.1.0
aiomysql==0.2.0
sqlalchemy==2.0.25
# ==================== 数据库 - MongoDB (非结构化数据) ====================
motor==3.3.2
pymongo==4.5.0
# ==================== 数据库 - Redis (缓存/队列) ====================
redis==5.0.0
# ==================== 异步任务 ====================
celery==5.3.4
# ==================== RAG / 向量数据库 ====================
# chromadb==0.4.22 # Windows 需要 C++ 编译环境,如需安装请使用预编译版本或 WSL
sentence-transformers==2.7.0
faiss-cpu==1.8.0
# ==================== 文档解析 ====================
pandas==2.1.4
openpyxl==3.1.2
python-docx==0.8.11
markdown-it-py==3.0.0
chardet==5.2.0
Pillow>=10.0.0
pytesseract>=0.3.10
# ==================== PDF 生成 ====================
reportlab>=4.0.0
# ==================== AI / LLM ====================
httpx==0.25.2
# ==================== 数据处理与可视化 ====================
matplotlib==3.8.2
numpy==1.26.2
# ==================== 工具库 ====================
requests==2.31.0
loguru==0.7.2
tqdm==4.66.1
PyYAML==6.0.1