- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for UserIn (0.17 sec)
-
docs_src/extra_models/tutorial002_py310.py
email: EmailStr full_name: str | None = None class UserIn(UserBase): password: str class UserOut(UserBase): pass class UserInDB(UserBase): hashed_password: str def fake_password_hasher(raw_password: str): return "supersecret" + raw_password def fake_save_user(user_in: UserIn): hashed_password = fake_password_hasher(user_in.password)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 792 bytes - Viewed (0) -
docs_src/response_model/tutorial003_py310.py
from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: str | None = None class UserOut(BaseModel): username: str email: EmailStr full_name: str | None = None @app.post("/user/", response_model=UserOut) async def create_user(user: UserIn) -> Any:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 431 bytes - Viewed (0) -
docs_src/response_model/tutorial002.py
from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: Union[str, None] = None # Don't do this in production! @app.post("/user/") async def create_user(user: UserIn) -> UserIn:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 350 bytes - Viewed (0) -
docs_src/extra_models/tutorial002.py
email: EmailStr full_name: Union[str, None] = None class UserIn(UserBase): password: str class UserOut(UserBase): pass class UserInDB(UserBase): hashed_password: str def fake_password_hasher(raw_password: str): return "supersecret" + raw_password def fake_save_user(user_in: UserIn): hashed_password = fake_password_hasher(user_in.password)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 824 bytes - Viewed (0) -
docs_src/response_model/tutorial003_01_py310.py
app = FastAPI() class BaseUser(BaseModel): username: str email: EmailStr full_name: str | None = None class UserIn(BaseUser): password: str @app.post("/user/") async def create_user(user: UserIn) -> BaseUser:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 317 bytes - Viewed (0) -
docs_src/response_model/tutorial003_01.py
app = FastAPI() class BaseUser(BaseModel): username: str email: EmailStr full_name: Union[str, None] = None class UserIn(BaseUser): password: str @app.post("/user/") async def create_user(user: UserIn) -> BaseUser:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 349 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 04 20:47:07 GMT 2023 - 5.6K bytes - Viewed (0) -
docs_src/response_model/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 450 bytes - Viewed (0) -
docs_src/response_model/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: str | None = None # Don't do this in production! @app.post("/user/") async def create_user(user: UserIn) -> UserIn:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 318 bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
`BaseUser` has the base fields. Then `UserIn` inherits from `BaseUser` and adds the `password` field, so, it will include all the fields from both models. We annotate the function return type as `BaseUser`, but we are actually returning a `UserIn` instance.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17.9K bytes - Viewed (0)