- Sort Score
- Result 10 results
- Languages All
Results 431 - 440 of 1,058 for Fstr (0.02 sec)
-
tests/test_extra_routes.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None @app.api_route("/items/{item_id}", methods=["GET"]) def get_items(item_id: str): return {"item_id": item_id} def get_not_decorated(item_id: str): return {"item_id": item_id} app.add_api_route("/items-not-decorated/{item_id}", get_not_decorated)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/multichannel/ChannelInfoTest.java
assertNotEquals(channelInfo, different); } @Test void testToString() { String str = channelInfo.toString(); assertNotNull(str); assertTrue(str.contains("test-channel")); assertTrue(str.contains(ChannelState.DISCONNECTED.toString())); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 11:13:46 UTC 2025 - 7.4K bytes - Viewed (0) -
tests/test_no_schema_split.py
class MessageEventType(str, Enum): alpha = "alpha" beta = "beta" class MessageEvent(BaseModel): event_type: MessageEventType = Field(default=MessageEventType.alpha) output: str class MessageOutput(BaseModel): body: str = "" events: list[MessageEvent] = [] class Message(BaseModel): input: str output: MessageOutput
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.4K bytes - Viewed (0) -
tests/test_get_model_definitions_formfeed_escape.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.8K bytes - Viewed (0) -
tests/test_custom_schema_fields.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, WithJsonSchema app = FastAPI() class Item(BaseModel): name: str description: Annotated[ Optional[str], WithJsonSchema({"type": ["string", "null"]}) ] = None model_config = { "json_schema_extra": { "x-something-internal": {"level": 4}, } }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.3K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial002_py39.py
from dataclasses import dataclass, field from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 543 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 537 bytes - Viewed (0) -
docs/ja/docs/tutorial/encoder.md
同様に、このデータベースはPydanticモデル(属性を持つオブジェクト)を受け取らず、`dict`だけを受け取ります。 そのために`jsonable_encoder`を使用することができます。 Pydanticモデルのようなオブジェクトを受け取り、JSON互換版を返します: {* ../../docs_src/encoder/tutorial001.py hl[5,22] *} この例では、Pydanticモデルを`dict`に、`datetime`を`str`に変換します。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Jun 22 14:36:05 UTC 2025 - 1.9K bytes - Viewed (0) -
docs_src/additional_responses/tutorial002_py310.py
from pydantic import BaseModel class Item(BaseModel): id: str value: str app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={ 200: { "content": {"image/png": {}}, "description": "Return the JSON item or an image.", } }, ) async def read_item(item_id: str, img: bool | None = None): if img:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 596 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial003_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 512 bytes - Viewed (0)