# 10-weeks-fastapi-zero2project **Repository Path**: yake2024/10-weeks-fastapi-zero2project ## Basic Information - **Project Name**: 10-weeks-fastapi-zero2project - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-14 - **Last Updated**: 2026-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FastAPI 10 周学习路线 ## 环境要求 - Python 3.13(`D:\Python\Python313`) - [uv](https://github.com/astral-sh/uv) ≥ 0.11 ## 首次创建虚拟环境 ```powershell uv venv --seed --python "D:\Python\Python313\python.exe" uv pip install --python .venv\Scripts\python.exe -r requirements.txt ``` 依赖按周追加到 `requirements.txt`(第 4 周 fastapi/uvicorn,第 6 周 jinja2/python-multipart,第 7 周 sqlalchemy),不要一次性预装。 ## 日常用法(工作区根) ```powershell .\.venv\Scripts\Activate.ps1 # 激活 uv pip install --python .venv\Scripts\python.exe -r requirements.txt # 装/更新依赖(快) python -m pytest week01 -q # 跑某周自检 ``` ## 小提示 uv 缓存盘和 E 盘不在同一分区,首次安装会退化为完整复制(不影响使用,只是会慢一点)。如果要消除该提示,可设环境变量 `UV_LINK_MODE=copy`: ```powershell $env:UV_LINK_MODE="copy" # 仅当前终端生效 ``` 如需永久生效(用户级环境变量): ```powershell [Environment]::SetEnvironmentVariable("UV_LINK_MODE", "copy", "User") ```