MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / update_user

Function update_user

examples/fastapi/routers.py:25–27  ·  view source on GitHub ↗
(user_id: int, user: UserIn_Pydantic)

Source from the content-addressed store, hash-verified

23
24@router.put("/user/{user_id}", response_model=User_Pydantic)
25async def update_user(user_id: int, user: UserIn_Pydantic):
26 await Users.filter(id=user_id).update(**user.model_dump(exclude_unset=True))
27 return await User_Pydantic.from_queryset_single(Users.get(id=user_id))
28
29
30@router.delete("/user/{user_id}", response_model=Status)

Callers

nothing calls this directly

Calls 4

updateMethod · 0.80
from_queryset_singleMethod · 0.80
filterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…