1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| # https://docs.astral.sh/uv/getting-started/installation/ # 安装uv powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# 初始化项目 uv init -p 3.14
#安装fastapi uv add fastapi uvicorn
#安装python-multipart,使用post请求上传文件 uv add python-multipart
#安装数据库, uv add aerich[toml]
#添加数据库, 创建数据库文件 uv add tortoise-orm[asyncpg]
#初始化配置文件和迁移文件位置 uv run aerich init -t config.TORTOISE_ORM
# 创建数据库 uv run aerich init-db
# 迁移数据 uv run aerich migrate # 更新数据 uv run aerich upgrade
|
1 2 3 4 5 6 7 8
| # 1. 添加修改的文件 git add .
# 2. 提交修改 git commit -m "路由"
# 3. 推送到 GitHub git push
|
版权声明: 此文章版權歸 ALICS 所有,如有轉載,請註明來自原作者