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

Function create_user

examples/fastapi/routers.py:14–16  ·  view source on GitHub ↗
(user: UserIn_Pydantic)

Source from the content-addressed store, hash-verified

12
13@router.post("/users", response_model=User_Pydantic)
14async def create_user(user: UserIn_Pydantic):
15 user_obj = await Users.create(**user.model_dump(exclude_unset=True))
16 return await User_Pydantic.from_tortoise_orm(user_obj)
17
18
19@router.get("/user/{user_id}", response_model=User_Pydantic)

Callers

nothing calls this directly

Calls 2

from_tortoise_ormMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…