- Sort Score
- Num 10 results
- Language All
Results 961 - 970 of 2,110 for py$ (0.02 seconds)
-
docs/zh/docs/advanced/testing-events.md
当你需要在测试中运行 `lifespan` 时,可以将 `TestClient` 与 `with` 语句一起使用: {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *} 你可以在[官方 Starlette 文档站点的“在测试中运行 lifespan”](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)阅读更多细节。 对于已弃用的 `startup` 和 `shutdown` 事件,可以按如下方式使用 `TestClient`:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 622 bytes - Click Count (0) -
docs/en/docs/tutorial/stream-json-lines.md
{* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[1:24] hl[24] *} If each JSON item you want to send back is of type `Item` (a Pydantic model) and it's an async function, you can declare the return type as `AsyncIterable[Item]`: {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[1:24] hl[9:11,22] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.3K bytes - Click Count (0) -
docs/ja/docs/advanced/path-operation-advanced-configuration.md
### *path operation関数* の名前をoperationIdとして使用する { #using-the-path-operation-function-name-as-the-operationid } APIの関数名を `operationId` として利用したい場合、すべてのAPI関数をイテレーションし、各 *path operation* の `operation_id` を `APIRoute.name` で上書きすれば可能です。 すべての *path operation* を追加した後に行うべきです。 {* ../../docs_src/path_operation_advanced_configuration/tutorial002_py310.py hl[2, 12:21, 24] *} /// tip | 豆知識Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/ja/docs/tutorial/path-operation-configuration.md
このような場合、タグを`Enum`に格納すると理にかなっています。 **FastAPI** は、プレーンな文字列の場合と同じ方法でそれをサポートしています: {* ../../docs_src/path_operation_configuration/tutorial002b_py310.py hl[1,8:10,13,18] *} ## 概要と説明 { #summary-and-description } `summary`と`description`を追加できます: {* ../../docs_src/path_operation_configuration/tutorial003_py310.py hl[17:18] *} ## docstringを用いた説明 { #description-from-docstring }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 4.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/header-params.md
## 导入 `Header` { #import-header } 首先,导入 `Header`: {* ../../docs_src/header_params/tutorial001_an_py310.py hl[3] *} ## 声明 `Header` 参数 { #declare-header-parameters } 然后,使用和 `Path`、`Query`、`Cookie` 一样的结构定义 header 参数。 第一个值是默认值,还可以传递所有验证参数或注释参数: {* ../../docs_src/header_params/tutorial001_an_py310.py hl[9] *} /// note | 技术细节 `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:39:41 GMT 2026 - 2.6K bytes - Click Count (0) -
docs/ja/docs/advanced/stream-data.md
{* ../../docs_src/stream_data/tutorial001_py310.py ln[1:23] hl[20,23] *} FastAPI は各データチャンクをそのまま `StreamingResponse` に渡し、JSON などに変換しようとはしません。 ### 非 async な path operation 関数 { #non-async-path-operation-functions } `async` なしの通常の `def` 関数でも同様に `yield` を使えます。 {* ../../docs_src/stream_data/tutorial001_py310.py ln[26:29] hl[27] *} ### アノテーションなし { #no-annotation }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:55:22 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/en/docs/how-to/separate-openapi-schemas.md
Let's say you have a Pydantic model with default values, like this one: {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:7] hl[7] *} ### Model for Input { #model-for-input } If you use this model as an input like here: {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:15] hl[14] *} ...then the `description` field will **not be required**. Because it has a default value of `None`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 4.5K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/middleware.md
強制所有傳入請求必須使用 `https` 或 `wss`。 任何指向 `http` 或 `ws` 的請求都會被重新導向至對應的安全協定。 {* ../../docs_src/advanced_middleware/tutorial001_py310.py hl[2,6] *} ## `TrustedHostMiddleware` { #trustedhostmiddleware } 強制所有傳入請求正確設定 `Host` 標頭,以防範 HTTP Host Header 攻擊。 {* ../../docs_src/advanced_middleware/tutorial002_py310.py hl[2,6:8] *} 支援以下參數:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.9K bytes - Click Count (0) -
docs/en/docs/tutorial/extra-models.md
/// ## Multiple models { #multiple-models } Here's a general idea of how the models could look like with their password fields and the places where they are used: {* ../../docs_src/extra_models/tutorial001_py310.py hl[7,9,14,20,22,27:28,31:33,38:39] *} ### About `**user_in.model_dump()` { #about-user-in-model-dump } #### Pydantic's `.model_dump()` { #pydantics-model-dump } `user_in` is a Pydantic model of class `UserIn`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/path-operation-advanced-configuration.md
{* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *} ### 使用路徑操作函式(path operation function)的名稱作為 operationId { #using-the-path-operation-function-name-as-the-operationid } 如果你想用 API 的函式名稱作為 `operationId`,你可以遍歷所有路徑,並使用各自的 `APIRoute.name` 覆寫每個*路徑操作*的 `operation_id`。 應在加入所有*路徑操作*之後再這麼做。 {* ../../docs_src/path_operation_advanced_configuration/tutorial002_py310.py hl[2, 12:21, 24] *} /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.5K bytes - Click Count (0)