- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 685 for Dict (0.02 seconds)
-
tests/test_security_scopes.py
from fastapi.testclient import TestClient @pytest.fixture(name="call_counter") def call_counter_fixture(): return {"count": 0} @pytest.fixture(name="app") def app_fixture(call_counter: dict[str, int]): def get_db(): call_counter["count"] += 1 return f"db_{call_counter['count']}" def get_user(db: Annotated[str, Depends(get_db)]): return "user" app = FastAPI()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1006 bytes - Click Count (0) -
src/main/webapp/WEB-INF/view/admin/dict/synonym/admin_dict_synonym.jsp
<jsp:include page="/WEB-INF/view/common/admin/sidebar.jsp"> <jsp:param name="menuCategoryType" value="system"/> <jsp:param name="menuType" value="dict"/> </jsp:include> <main class="content-wrapper"> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6">
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Mon Feb 23 08:03:44 GMT 2026 - 10.2K bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
@app.put("/invalid-user/{user_id}") def put_invalid_user( user_id: str, name: str = Body(), db: dict = Depends(get_database) ): db[user_id] = name raise HTTPException(status_code=400, detail="Invalid user") @app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"} @pytest.fixture(autouse=True)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
tests/test_invalid_sequence_param.py
match="Query parameter 'q' must be one of the supported types", ): app = FastAPI() class Item(BaseModel): title: str @app.get("/items/") def read_items(q: dict[str, Item] = Query(default=None)): pass # pragma: no cover def test_invalid_simple_dict(): with pytest.raises( AssertionError,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons} client = TestClient(app)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/body-updates.md
比如,`item.model_dump(exclude_unset=True)`。 这会生成一个 `dict`,只包含创建 `item` 模型时显式设置的数据,不包含默认值。 然后再用它生成一个只含已设置(在请求中发送)数据、且省略默认值的 `dict`: {* ../../docs_src/body_updates/tutorial002_py310.py hl[32] *} ### 使用 Pydantic 的 `update` 参数 { #using-pydantics-update-parameter } 接下来,用 `.model_copy()` 为已有模型创建副本,并传入 `update` 参数,值为包含更新数据的 `dict`。 例如,`stored_item_model.model_copy(update=update_data)`:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.7K bytes - Click Count (0) -
fastapi/sse.py
from starlette.responses import StreamingResponse # Canonical SSE event schema matching the OpenAPI 3.2 spec # (Section 4.14.4 "Special Considerations for Server-Sent Events") _SSE_EVENT_SCHEMA: dict[str, Any] = { "type": "object", "properties": { "data": {"type": "string"}, "event": {"type": "string"}, "id": {"type": "string"}, "retry": {"type": "integer", "minimum": 0},
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 6.2K bytes - Click Count (0) -
fastapi/applications.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 01 16:16:24 GMT 2026 - 178.6K bytes - Click Count (0) -
docs/en/docs/advanced/additional-responses.md
You can pass to your *path operation decorators* a parameter `responses`. It receives a `dict`: the keys are status codes for each response (like `200`), and the values are other `dict`s with the information for each of them. Each of those response `dict`s can have a key `model`, containing a Pydantic model, just like `response_model`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
# 类作为依赖项 { #classes-as-dependencies } 在深入探究 **依赖注入** 系统之前,让我们升级之前的例子。 ## 来自前一个例子的`dict` { #a-dict-from-the-previous-example } 在前面的例子中, 我们从依赖项 ("可依赖对象") 中返回了一个 `dict`: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *} 但是后面我们在路径操作函数的参数 `commons` 中得到了一个 `dict`。 我们知道编辑器不能为 `dict` 提供很多支持(比如补全),因为编辑器不知道 `dict` 的键和值类型。 对此,我们可以做的更好... ## 什么构成了依赖项 { #what-makes-a-dependency } 到目前为止,你看到的依赖项都被声明为函数。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 6.8K bytes - Click Count (0)