- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 277 for BaseModel (0.08 sec)
-
.github/actions/people/app/main.py
class Discussions(BaseModel): edges: List[DiscussionsEdge] class DiscussionsRepository(BaseModel): discussions: Discussions class DiscussionsResponseData(BaseModel): repository: DiscussionsRepository class DiscussionsResponse(BaseModel): data: DiscussionsResponseData # PRs class LabelNode(BaseModel): name: str class Labels(BaseModel):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 19.2K bytes - Viewed (1) -
.github/actions/notify-translations/app/main.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 Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 29 23:35:07 UTC 2024 - 12.4K 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.7K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
normal = "normal" class ModelWithConfig(BaseModel): role: Optional[RoleEnum] = None if PYDANTIC_V2: model_config = {"use_enum_values": True} else: class Config: use_enum_values = True class ModelWithAlias(BaseModel): foo: str = Field(alias="Foo") class ModelWithDefault(BaseModel): foo: str = ... # type: ignore bar: str = "bar"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_validate_response_recursive/app_pv2.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class RecursiveItem(BaseModel): sub_items: List["RecursiveItem"] = [] name: str RecursiveItem.model_rebuild() class RecursiveSubitemInSubmodel(BaseModel): sub_items2: List["RecursiveItemViaSubmodel"] = [] name: str class RecursiveItemViaSubmodel(BaseModel): sub_items1: List[RecursiveSubitemInSubmodel] = []
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_duplicate_models_openapi.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Model(BaseModel): pass class Model2(BaseModel): a: Model class Model3(BaseModel): c: Model d: Model2 @app.get("/", response_model=Model3) def f(): return {"c": {}, "d": {"a": {}}} client = TestClient(app) def test_get_api_route():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
fastapi/_compat.py
def _model_rebuild(model: Type[BaseModel]) -> None: model.model_rebuild() def _model_dump( model: BaseModel, mode: Literal["json", "python"] = "json", **kwargs: Any ) -> Any: return model.model_dump(mode=mode, **kwargs) def _get_model_config(model: BaseModel) -> Any: return model.model_config def get_schema_from_model_field(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
docs_src/response_model/tutorial003_py310.py
from typing import Any 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 @app.post("/user/", response_model=UserOut) async def create_user(user: UserIn) -> Any:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 431 bytes - Viewed (0) -
tests/test_skip_defaults.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class SubModel(BaseModel): a: Optional[str] = "foo" class Model(BaseModel): x: Optional[int] = None sub: SubModel class ModelSubclass(Model): y: int z: int = 0 w: Optional[int] = None class ModelDefaults(BaseModel): w: Optional[str] = None x: Optional[str] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/app_pv1.py
from typing import Optional from fastapi import Depends, FastAPI from pydantic import BaseModel, validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None model_b: ModelB @validator("name") def lower_username(cls, name: str, values):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 784 bytes - Viewed (0)