- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 685 for Dict (0.02 seconds)
-
tests/test_router_events.py
@asynccontextmanager async def lifespan(app: FastAPI) -> AsyncGenerator[dict[str, bool], None]: state.app_startup = True yield {"app": True} state.app_shutdown = True @asynccontextmanager async def router_lifespan(app: FastAPI) -> AsyncGenerator[dict[str, bool], None]: state.router_startup = True yield {"router": True}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/extra-models.md
```Python { 'username': 'john', 'password': 'secret', 'email': '******@****.***', 'full_name': None, } ``` #### 解包 `dict` { #unpacking-a-dict } 若將像 `user_dict` 這樣的 `dict` 以 `**user_dict` 傳給函式(或類別),Python 會將其「解包」,把 `user_dict` 的鍵和值直接當作具名引數傳入。 因此,延續上面的 `user_dict`,寫成: ```Python UserInDB(**user_dict) ``` 效果等同於: ```Python UserInDB( username="john",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.3K bytes - Click Count (0) -
fastapi/utils.py
return operation_id def deep_dict_update(main_dict: dict[Any, Any], update_dict: dict[Any, Any]) -> None: for key, value in update_dict.items(): if ( key in main_dict and isinstance(main_dict[key], dict) and isinstance(value, dict) ): deep_dict_update(main_dict[key], value) elif (
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 4.2K bytes - Click Count (0) -
fastapi/dependencies/utils.py
return values async def request_body_to_args( body_fields: list[ModelField], received_body: dict[str, Any] | FormData | bytes | None, embed_body_fields: bool, ) -> tuple[dict[str, Any], list[dict[str, Any]]]: values: dict[str, Any] = {} errors: list[dict[str, Any]] = [] assert body_fields, "request_body_to_args() should be called with fields"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 38.7K bytes - Click Count (3) -
docs/ko/docs/tutorial/encoder.md
같은 방식으로 이 데이터베이스는 Pydantic 모델(속성이 있는 객체)을 받지 않고, `dict`만을 받습니다. 이를 위해 `jsonable_encoder`를 사용할 수 있습니다. Pydantic 모델 같은 객체를 받고 JSON 호환 가능한 버전을 반환합니다: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} 이 예시에서는 Pydantic 모델을 `dict`로, `datetime`을 `str`로 변환합니다. 이렇게 호출한 결과는 파이썬 표준인 [`json.dumps()`](https://docs.python.org/3/library/json.html#json.dumps)로 인코딩할 수 있습니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 1.8K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/mylasta/action/FessHtmlPathTest.java
// Test dictionary paths structure assertEquals("/admin/dict/admin_dict.jsp", FessHtmlPath.path_AdminDict_AdminDictJsp.getRoutingPath()); assertEquals("/admin/dict/kuromoji/admin_dict_kuromoji.jsp", FessHtmlPath.path_AdminDictKuromoji_AdminDictKuromojiJsp.getRoutingPath());Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 13.1K bytes - Click Count (0) -
docs/en/docs/tutorial/encoder.md
The same way, this database wouldn't receive a Pydantic model (an object with attributes), only a `dict`. You can use `jsonable_encoder` for that. It receives an object, like a Pydantic model, and returns a JSON compatible version: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1.6K bytes - Click Count (0) -
fastapi/params.py
"although still supported. Use examples instead." ), ] = _Unset, openapi_examples: dict[str, Example] | None = None, deprecated: deprecated | str | bool | None = None, include_in_schema: bool = True, json_schema_extra: dict[str, Any] | None = None, **extra: Any, ): if example is not _Unset: warnings.warn(Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 25.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/encoder.md
在某些情況下,你可能需要將某種資料型別(例如 Pydantic 模型)轉換為與 JSON 相容的類型(例如 `dict`、`list` 等)。 例如,當你需要把它儲存在資料庫中。 為此,**FastAPI** 提供了 `jsonable_encoder()` 函式。 ## 使用 `jsonable_encoder` { #using-the-jsonable-encoder } 想像你有一個只接受與 JSON 相容資料的資料庫 `fake_db`。 例如,它不接受 `datetime` 物件,因為那與 JSON 不相容。 因此,必須將 `datetime` 物件轉為一個以 [ISO 格式](https://en.wikipedia.org/wiki/ISO_8601) 表示資料的 `str`。 同樣地,這個資料庫不會接受 Pydantic 模型(帶有屬性的物件),只接受 `dict`。 你可以使用 `jsonable_encoder` 來處理。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 1.5K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/dict/kuromoji/ApiAdminDictKuromojiAction.java
import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.admin.dict.kuromoji.UploadForm; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.admin.FessApiAdminAction; import org.codelibs.fess.dict.kuromoji.KuromojiFile; import org.codelibs.fess.dict.kuromoji.KuromojiItem; import org.lastaflute.web.Execute; import org.lastaflute.web.response.JsonResponse;
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Aug 07 03:06:29 GMT 2025 - 9.4K bytes - Click Count (0)