Skip to content

Commit

Permalink
updating site on Sun Sep 1 17:46:07 CDT 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
hongtaoh committed Sep 1, 2024
1 parent 135fd9e commit 5b78949
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/cn/blog/2024-09-01-fastapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ conda create --name fastapi python=3.11

```bash
conda activate fastapi
conda install fastapi
# Use pip to install FastAPI with standard dependencies
pip install "fastapi[standard]"

```

`fastapi` 项目里创建 `main.py`:
Expand All @@ -39,7 +41,7 @@ async def root():
async def read_item(item_id: int, q:Optional[str] = None):
return {"item_id": item_id, "q": q}

# order matterrs
# order matters

@app.get("/users/me")
async def read_user_me():
Expand Down

0 comments on commit 5b78949

Please sign in to comment.