- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for BaseModel (0.05 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) -
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) -
tests/test_sub_callbacks.py
from fastapi.testclient import TestClient from pydantic import BaseModel, HttpUrl app = FastAPI() class Invoice(BaseModel): id: str title: Optional[str] = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.8K bytes - Viewed (0) -
tests/test_tuples.py
from typing import List, Tuple from dirty_equals import IsDict from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class ItemGroup(BaseModel): items: List[Tuple[str, str]] class Coordinate(BaseModel): x: float y: float @app.post("/model-with-tuple/") def post_model_with_tuple(item_group: ItemGroup): return item_group
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 11.8K bytes - Viewed (0) -
tests/test_response_by_alias.py
from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict, Field app = FastAPI() class Model(BaseModel): name: str = Field(alias="alias") class ModelNoAlias(BaseModel): name: str if PYDANTIC_V2: model_config = ConfigDict( json_schema_extra={ "description": (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 11.1K bytes - Viewed (0) -
docs/ru/docs/tutorial/body.md
/// ## Импортирование `BaseModel` из Pydantic Первое, что вам необходимо сделать, это импортировать `BaseModel` из пакета `pydantic`: ```Python hl_lines="4" {!../../docs_src/body/tutorial001.py!} ``` ## Создание вашей собственной модели После этого вы описываете вашу модель данных как класс, наследующий от `BaseModel`. Используйте аннотации типов Python для всех атрибутов:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import PYDANTIC_V2, needs_pydanticv2 class SubItem(BaseModel): subname: str sub_description: Optional[str] = None tags: List[str] = [] if PYDANTIC_V2: model_config = {"json_schema_serialization_defaults_required": True} class Item(BaseModel): name: str description: Optional[str] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 19.7K bytes - Viewed (0) -
docs/uk/docs/tutorial/body.md
/// ## Імпортуйте `BaseModel` від Pydantic Спочатку вам потрібно імпортувати `BaseModel` з `pydantic`: //// tab | Python 3.8 і вище ```Python hl_lines="4" {!> ../../docs_src/body/tutorial001.py!} ``` //// //// tab | Python 3.10 і вище
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0)