- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 1,675 for tone (0.02 seconds)
-
tests/test_compat.py
def foo(req: Model) -> dict[str, Union[str, None]]: return { "value": req.value or None, "embedded_value": req.embedded_model.value or None, } client = TestClient(app) response = client.post("/", json={}) assert response.status_code == 200, response.text assert response.json() == { "value": None, "embedded_value": None, } response2 = client.post(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 4.2K bytes - Click Count (0) -
cmd/object-handlers_test.go
content: "hello", partNumber: "1", fault: None, accessKey: credentials.AccessKey, secretKey: credentials.SecretKey, expectedAPIError: -1, }, // Case where part number is invalid. 1: { objectName: testObject, content: "hello", partNumber: "9999999999999999999", fault: None, accessKey: credentials.AccessKey,
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 163.1K bytes - Click Count (0) -
tests/test_pydanticv2_dataclasses_uuid_stringified_annotations.py
from inline_snapshot import snapshot @dataclass class Item: id: uuid.UUID 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("/item", response_model=Item) async def read_item(): return { "id": uuid.uuid4(), "name": "Island In The Moon",Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.1K bytes - Click Count (0) -
tests/test_request_params/test_file/test_optional_list.py
async def read_optional_list_bytes(p: Annotated[Optional[list[bytes]], File()] = None): return {"file_size": [len(file) for file in p] if p else None} @app.post("/optional-list-uploadfile") async def read_optional_list_uploadfile( p: Annotated[Optional[list[UploadFile]], File()] = None, ): return {"file_size": [file.size for file in p] if p else None} @pytest.mark.parametrize( "path", [
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 10.4K bytes - Click Count (0) -
tests/test_params_repr.py
from fastapi.params import Body, Cookie, Header, Param, Path, Query test_data: list[Any] = ["teststr", None, ..., 1, []] def get_user(): return {} # pragma: no cover def test_param_repr_str(): assert repr(Param("teststr")) == "Param(teststr)" def test_param_repr_none(): assert repr(Param(None)) == "Param(None)" def test_param_repr_ellipsis(): assert repr(Param(...)) == "Param(PydanticUndefined)"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 2.3K bytes - Click Count (0) -
docs_src/body/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 271 bytes - Click Count (0) -
docs_src/dataclasses_/tutorial001_py310.py
from dataclasses import dataclass from fastapi import FastAPI @dataclass class Item: name: str price: float description: str | None = None tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 275 bytes - Click Count (0) -
docs_src/cookie_param_models/tutorial002_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 343 bytes - Click Count (0) -
docs_src/cookie_param_models/tutorial001_an_py310.py
from typing import Annotated from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): session_id: str fatebook_tracker: str | None = None googall_tracker: str | None = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 343 bytes - Click Count (0) -
docs_src/body_nested_models/tutorial007_py310.py
url: HttpUrl name: str class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() images: list[Image] | None = None class Offer(BaseModel): name: str description: str | None = None price: float items: list[Item] @app.post("/offers/") async def create_offer(offer: Offer):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 520 bytes - Click Count (0)