上一页 1 2 3 4 5 6 7 ··· 198 下一页
摘要: 一,报错信息: $ git status On branch master Your branch is ahead of 'origin/master' by 630 commits. (use "git push" to publish your local commits) You have 阅读全文
posted @ 2026-06-18 10:08 刘宏缔的架构森林 阅读(10) 评论(0) 推荐(0)
摘要: 一,安装所需的库 $ pip install typer 二,代码: run_cli.py # run_cli.py import typer from app.commands import calc_util # 创建总的 Typer 实例 app = typer.Typer(help="基于t 阅读全文
posted @ 2026-06-18 10:07 刘宏缔的架构森林 阅读(3) 评论(0) 推荐(0)
摘要: 一,代码: .env APP_NAME="My FastAPI App" LOGS_DIR="/data/fastapi/test123/logs" ITEMS_PER_PAGE=20 解析类: # app/core/Setttins.py from pydantic_settings import 阅读全文
posted @ 2026-06-18 10:07 刘宏缔的架构森林 阅读(3) 评论(0) 推荐(0)
摘要: 一,问题: Elasticsearch 中 IK 分词器将“狮猫精酿”错误切分为“狮 猫精 酿”的问题,你需要在 IK 分词器的自定义扩展词典中添加“狮猫”和“精酿”,以确保分词器能够正确识别这两个词组。 二,解决: 1. 找到 IK 插件的配置目录 进入你的 Elasticsearch 安装目录, 阅读全文
posted @ 2026-06-18 10:07 刘宏缔的架构森林 阅读(13) 评论(0) 推荐(0)
摘要: 一,报错: ERROR [flask_migrate] Error: Multiple heads are present; please specify a single target revision 完整的报错信息: $ flask db stamp head /data/python/fla 阅读全文
posted @ 2026-06-18 10:07 刘宏缔的架构森林 阅读(4) 评论(0) 推荐(0)
摘要: 一,报错信息 File "/data/python/flask/panda-sys/venv/lib/python3.10/site-packages/alembic/script/revision.py", line 768, in _resolve_revision_number self._r 阅读全文
posted @ 2026-06-18 10:06 刘宏缔的架构森林 阅读(5) 评论(0) 推荐(0)
摘要: 一,报错信息 报错代码 from passlib.context import CryptContext # 密码哈希上下文 pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") # 工具函数 def verify_pas 阅读全文
posted @ 2026-06-12 10:54 刘宏缔的架构森林 阅读(26) 评论(0) 推荐(0)
摘要: 一,报错信息: /data/python/fastapi/demo1/venv/lib/python3.10/site-packages/jwt/api_jwt.py:368: InsecureKeyLengthWarning: The HMAC key is 31 bytes long, whic 阅读全文
posted @ 2026-06-12 10:54 刘宏缔的架构森林 阅读(12) 评论(0) 推荐(0)
摘要: 一,代码 import hashlib from datetime import datetime, timedelta, timezone from typing import Optional from fastapi import FastAPI, Depends, HTTPException 阅读全文
posted @ 2026-06-12 10:53 刘宏缔的架构森林 阅读(5) 评论(0) 推荐(0)
摘要: 一,安装用到的第三方库 $ pip install redis 说明: redis库和aioredis库两者有什么区别? 这是一个非常经典的“历史遗留”问题。其实在今天,它们已经没有区别了,因为它们已经合并成了同一个库。 简单来说:aioredis 已经被合并到了官方的 redis 库中。 二,代码 阅读全文
posted @ 2026-06-12 10:53 刘宏缔的架构森林 阅读(15) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 198 下一页