Init commit

This commit is contained in:
sleepwithoutbz
2025-09-25 17:49:47 +08:00
committed by Ubuntu
commit d02f901519
2 changed files with 16 additions and 0 deletions

14
main.py Normal file
View File

@@ -0,0 +1,14 @@
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: Union[str, None] = None):
return {"item_id": item_id, "q": q}