- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 474 for dict (0.01 seconds)
-
tests/test_request_params/test_body/test_list.py
} @pytest.mark.parametrize("json", [None, {}]) @pytest.mark.parametrize( "path", ["/required-list-str", "/model-required-list-str"], ) def test_required_list_str_missing(path: str, json: Union[dict, None]): client = TestClient(app) response = client.post(path, json=json) assert response.status_code == 422 assert response.json() == { "detail": [ {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:31:34 GMT 2025 - 11.9K bytes - Click Count (0) -
docs_src/python_types/tutorial008_py39.py
def process_items(prices: dict[str, float]): for item_name, item_price in prices.items(): print(item_name)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Jan 16 14:44:08 GMT 2022 - 145 bytes - Click Count (0) -
tests/test_pydantic_v1_error.py
class ModelV1A(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.post("/union") def endpoint(data: Union[dict, ModelV1A]): # pragma: no cover return data def test_raises_pydantic_v1_model_in_sequence() -> None: class ModelV1A(BaseModel): name: str app = FastAPI()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 2.3K bytes - Click Count (0) -
docs/ko/docs/tutorial/testing.md
그 후, 테스트에서도 동일하게 적용하면 됩니다. 예시: * *경로* 혹은 *쿼리* 매개변수를 전달하려면, URL 자체에 추가한다. * JSON 본문을 전달하려면, 파이썬 객체 (예를들면 `dict`) 를 `json` 파라미터로 전달한다. * JSON 대신 *폼 데이터* 를 보내야한다면, `data` 파라미터를 대신 전달한다. * *헤더* 를 전달하려면, `headers` 파라미터에 `dict` 를 전달한다. * *쿠키* 를 전달하려면, `cookies` 파라미터에 `dict` 를 전달한다.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 7.6K bytes - Click Count (0) -
tests/test_dependency_contextvars.py
from contextvars import ContextVar from typing import Any, Callable, Optional from fastapi import Depends, FastAPI, Request, Response from fastapi.testclient import TestClient legacy_request_state_context_var: ContextVar[Optional[dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) app = FastAPI() async def set_up_request_state_dependency(): request_state = {"user": "deadpond"}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.5K bytes - Click Count (0) -
docs/en/docs/features.md
"name": "Mary", "joined": "2018-11-30", } my_second_user: User = User(**second_user_data) ``` /// info `**second_user_data` means: Pass the keys and values of the `second_user_data` dict directly as key-value arguments, equivalent to: `User(id=4, name="Mary", joined="2018-11-30")` /// ### Editor support { #editor-support }
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 9.5K bytes - Click Count (0) -
docs/tr/docs/features.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 11.1K bytes - Click Count (0) -
docs/de/docs/how-to/custom-request-and-route.md
Ein `Request` hat auch ein `request.receive`, welches eine Funktion ist, die den Body des Requests <abbr title="Englisch „receive“">empfängt</abbr>. Das `scope`-`dict` und die `receive`-Funktion sind beide Teil der ASGI-Spezifikation.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 13:54:34 GMT 2025 - 5.7K bytes - Click Count (0) -
helm/minio/templates/_helpers.tpl
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Wed Aug 06 23:48:24 GMT 2025 - 6.4K bytes - Click Count (0) -
tests/test_request_params/test_body/utils.py
from typing import Any def get_body_model_name(openapi: dict[str, Any], path: str) -> str: body = openapi["paths"][path]["post"]["requestBody"] body_schema = body["content"]["application/json"]["schema"]
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 268 bytes - Click Count (0)