- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 229 for BaseModel (0.04 sec)
-
tests/test_validate_response_recursive/app.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class RecursiveItem(BaseModel): sub_items: list["RecursiveItem"] = [] name: str class RecursiveSubitemInSubmodel(BaseModel): sub_items2: list["RecursiveItemViaSubmodel"] = [] name: str class RecursiveItemViaSubmodel(BaseModel): sub_items1: list[RecursiveSubitemInSubmodel] = [] name: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.1K bytes - Viewed (0) -
tests/test_response_model_data_filter_no_inheritance.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class UserCreate(BaseModel): email: str password: str class UserDB(BaseModel): email: str hashed_password: str class User(BaseModel): email: str class PetDB(BaseModel): name: str owner: UserDB class PetOut(BaseModel): name: str owner: User
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.7K bytes - Viewed (0) -
scripts/sponsors.py
} } } } """ class SponsorEntity(BaseModel): login: str avatarUrl: str url: str class Tier(BaseModel): name: str monthlyPriceInDollars: float class SponsorshipAsMaintainerNode(BaseModel): sponsorEntity: SponsorEntity tier: Tier class SponsorshipAsMaintainerEdge(BaseModel): cursor: str node: SponsorshipAsMaintainerNodeRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 6.1K bytes - Viewed (0) -
scripts/notify_translations.py
addDiscussionComment: AddDiscussionComment class AddCommentResponse(BaseModel): data: AddCommentData class CommentsEdge(BaseModel): node: Comment cursor: str class Comments(BaseModel): edges: list[CommentsEdge] class CommentsDiscussion(BaseModel): comments: Comments class CommentsRepository(BaseModel):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 12.7K bytes - Viewed (0) -
docs_src/extra_models/tutorial001_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 class UserOut(BaseModel): username: str email: EmailStr full_name: str | None = None class UserInDB(BaseModel): username: str hashed_password: str email: EmailStr
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 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/additional_responses/tutorial001_py39.py
from fastapi import FastAPI from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str class Message(BaseModel): message: str app = FastAPI() @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}}) async def read_item(item_id: str): if item_id == "foo":
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 506 bytes - Viewed (0) -
scripts/people.py
class DiscussionsComments(BaseModel): totalCount: int nodes: list[DiscussionsCommentsNode] class DiscussionsNode(BaseModel): number: int author: Union[Author, None] = None title: str | None = None createdAt: datetime comments: DiscussionsComments class DiscussionsEdge(BaseModel): cursor: str node: DiscussionsNode class Discussions(BaseModel):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 12.3K bytes - Viewed (0) -
scripts/contributors.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 12:34:01 UTC 2025 - 8.6K bytes - Viewed (0) -
tests/test_pydantic_v1_error.py
from fastapi.exceptions import PydanticV1NotSupportedError with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) from pydantic.v1 import BaseModel def test_raises_pydantic_v1_model_in_endpoint_param() -> None: class ParamModelV1(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.post("/param")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 2.3K bytes - Viewed (0)