# 图扣扣项目-python服务 ### - 初始化项目 ``` #安装虚拟环境 python -m venv venv #启动虚拟环境 #win系统下,根目录执行 .\venv\Scripts\activate #可能存在安装依赖太慢得问题,需要设置镜像源,执行以下操作 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple #安装依赖 pip install -r requirements.txt ``` ### - 启动项目 ``` # 在虚拟环境中执行 python main.py ``` ### - 查看API文档 ``` # 本地浏览器请求 http://127.0.0.1:7074/docs ```