Compare commits

...

2 Commits

12 changed files with 37 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.12 virtualenv at H:\OwnProject\FilesReadSysteam\backend\venv" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings"> <component name="PyDocumentationSettings">

2
.idea/misc.xml generated
View File

@@ -3,5 +3,5 @@
<component name="Black"> <component name="Black">
<option name="sdkName" value="Python 3.12" /> <option name="sdkName" value="Python 3.12" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 virtualenv at H:\OwnProject\FilesReadSysteam\backend\venv" project-jdk-type="Python SDK" />
</project> </project>

View File

@@ -4,6 +4,7 @@ DEBUG=true
# 数据库 # 数据库
MONGODB_URL="mongodb://username:password@host:port" MONGODB_URL="mongodb://username:password@host:port"
MONGODB_DB_NAME=""
REDIS_URL="redis://localhost:6379/0" REDIS_URL="redis://localhost:6379/0"
# 大模型 API # 大模型 API

View File

View File

View File

View File

@@ -5,7 +5,6 @@ app = FastAPI(
title=settings.APP_NAME, title=settings.APP_NAME,
openapi_url=f"{settings.API_V1_STR}/openapi.json" openapi_url=f"{settings.API_V1_STR}/openapi.json"
) )
@app.get("/") @app.get("/")
async def root(): async def root():
return { return {

BIN
backend/image/image-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

BIN
backend/image/image-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
backend/image/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

View File

@@ -52,6 +52,18 @@ settings.json内容如下
``` ```
保存即可 保存即可
或者点击python解释器
![](image/image.png)
如果你完成了上述setting.json的配置可以直接选择第三个使用 xxx 设置中的python xxx
否则点击箭头指示的输入解释器路径
![](image/image-1.png)
找到你项目路径的\venv\Scripts\python.exe
![alt text](image\image-2.png)
例如我的H:\OwnProject\FilesReadSysteam\backend\venv\Scripts\python.exe (记得加上这个.exe)
输入进去即可
## 关于.gitignore ## 关于.gitignore
为了在上传git仓库时不把venv中的软件包和其他关于项目的特殊api key暴露请将.gitignore文件放在项目根目录下并添加以下内容 为了在上传git仓库时不把venv中的软件包和其他关于项目的特殊api key暴露请将.gitignore文件放在项目根目录下并添加以下内容
```bash ```bash
@@ -70,7 +82,28 @@ settings.json内容如下
为了数据安全请不要把api key暴露请将api key保存在.env文件中并添加到.gitignore中正如前文所示这样git就不会将api key上传到git仓库中。 为了数据安全请不要把api key暴露请将api key保存在.env文件中并添加到.gitignore中正如前文所示这样git就不会将api key上传到git仓库中。
但,可以保留.env.example文件以示需要调用的api key 但,可以保留.env.example文件以示需要调用的api key
### 预计项目结构: ## 关于git账户
```bash
#全局设置
git config --global user.name "你的名字"
git config --global user.email "你的邮箱@example.com"
#单个项目设置
cd 你的项目路径
git config user.name "你的项目专用名字"
git config user.email "你的项目专用邮箱@example.com"
#验证
git config --list #查看所有配置
git config user.name #查看单条
git config user.email #同上
#如果想看全局的,可以加上 --global例如 git config --global user.name
```
## 预计项目结构:
```bash ```bash
FilesReadSystem/ FilesReadSystem/
├── backend/ # 后端服务Python + FastAPI ├── backend/ # 后端服务Python + FastAPI