- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for EmailStr (0.45 sec)
-
docs_src/extra_models/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserBase(BaseModel): username: str 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):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 798 bytes - Viewed (0) -
docs_src/extra_models/tutorial001_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 class UserInDB(BaseModel): username: str hashed_password: str email: EmailStr full_name: str | None = None
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 905 bytes - Viewed (0) -
docs_src/extra_models/tutorial001_py39.py
from typing import Union 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 class UserOut(BaseModel): username: str email: EmailStr full_name: Union[str, None] = None class UserInDB(BaseModel): username: str hashed_password: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 949 bytes - Viewed (0) -
docs_src/response_model/tutorial003_py39.py
from typing import Any, Union 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 class UserOut(BaseModel): username: str email: EmailStr full_name: Union[str, None] = None @app.post("/user/", response_model=UserOut)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 450 bytes - Viewed (0) -
docs_src/response_model/tutorial002_py39.py
from typing import Union 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:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 350 bytes - Viewed (0) -
docs_src/extra_models/tutorial002_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserBase(BaseModel): username: str 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):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 830 bytes - Viewed (0) -
docs_src/response_model/tutorial003_01_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr 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:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 349 bytes - Viewed (0) -
fastapi/openapi/models.py
try: import email_validator assert email_validator # make autoflake ignore the unused import from pydantic import EmailStr except ImportError: # pragma: no cover class EmailStr(str): # type: ignore @classmethod def __get_validators__(cls) -> Iterable[Callable[..., Any]]: yield cls.validate @classmethodRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 15.1K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
Here we are declaring a `UserIn` model, it will contain a plaintext password: {* ../../docs_src/response_model/tutorial002_py310.py hl[7,9] *} /// info To use `EmailStr`, first install <a href="https://github.com/JoshData/python-email-validator" class="external-link" target="_blank">`email-validator`</a>.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 15.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/response-model.md
Aqui estamos declarando um modelo `UserIn`, ele conterá uma senha em texto simples: {* ../../docs_src/response_model/tutorial002_py310.py hl[7,9] *} /// info | Informação Para usar `EmailStr`, primeiro instale <a href="https://github.com/JoshData/python-email-validator" class="external-link" target="_blank">`email-validator`</a>.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 17.3K bytes - Viewed (0)