Add uv example (#30)

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
This commit is contained in:
github-actions[bot]
2024-12-23 17:33:29 +03:00
committed by GitHub
parent a998a1bfdb
commit ea0d72d879
17 changed files with 1950 additions and 130 deletions

16
docker/uv/main.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
@app.get("/")
async def root():
return {"message": "Hello World"}
@app.post("/items/")
async def create_item(item: Item):
return item