- Sort Score
- Num 10 results
- Language All
Results 871 - 880 of 2,110 for py (0.02 seconds)
-
docs/ja/docs/how-to/custom-request-and-route.md
例外が発生しても、`Request` インスタンスはスコープ内に残るため、エラー処理時にリクエストボディを読み取り、活用できます: {* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[17:19] *} ## ルーターでのカスタム `APIRoute` クラス { #custom-apiroute-class-in-a-router } `APIRouter` の `route_class` パラメータを設定することもできます: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 5.4K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/stream-data.md
{* ../../docs_src/stream_data/tutorial002_py310.py ln[6,19:20] hl[20] *} 接著在路徑操作函式中用 `response_class=PNGStreamingResponse` 使用這個新類別: {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *} ### 模擬檔案 { #simulate-a-file } 此範例中我們用 `io.BytesIO` 模擬檔案。它是只存在於記憶體中的類檔案物件,但提供相同的介面。 例如,我們可以像讀取一般檔案一樣,透過迭代來消耗其內容。 {* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *} /// note | 技術細節Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:33:04 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/zh/docs/tutorial/path-params-numeric-validations.md
因此,你可以将函数声明为: {* ../../docs_src/path_params_numeric_validations/tutorial002_py310.py hl[7] *} 但请记住,如果你使用 `Annotated`,你就不会遇到这个问题,因为你没有使用 `Query()` 或 `Path()` 作为函数参数的默认值。 {* ../../docs_src/path_params_numeric_validations/tutorial002_an_py310.py *} ## 按需对参数排序的技巧 { #order-the-parameters-as-you-need-tricks } /// tip | 提示 如果你使用 `Annotated`,这点可能不那么重要或必要。 ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/server-sent-events.md
從 `fastapi.sse` 匯入 `EventSourceResponse`: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} 每個 `yield` 的項目都會以 JSON 編碼並放在 SSE 事件的 `data:` 欄位中送出。 如果你把回傳型別宣告為 `AsyncIterable[Item]`,FastAPI 會用它來透過 Pydantic 進行**驗證**、**文件化**與**序列化**。 {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *} /// tip 因為 Pydantic 會在 **Rust** 端進行序列化,如果你有宣告回傳型別,效能會比未宣告時高很多。 ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:33:04 GMT 2026 - 4.6K bytes - Click Count (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
You would have to make sure that it is unique for each operation. {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *} ### Using the *path operation function* name as the operationId { #using-the-path-operation-function-name-as-the-operationid }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 7.1K bytes - Click Count (0) -
docs/en/docs/tutorial/body-updates.md
{* ../../docs_src/body_updates/tutorial002_py310.py hl[32] *} ### Using Pydantic's `update` parameter { #using-pydantics-update-parameter } Now, you can create a copy of the existing model using `.model_copy()`, and pass the `update` parameter with a `dict` containing the data to update. Like `stored_item_model.model_copy(update=update_data)`: {* ../../docs_src/body_updates/tutorial002_py310.py hl[33] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_code_includes/data/en_doc.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 08:08:04 GMT 2026 - 314 bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/path-params-numeric-validations.md
因此,你可以這樣宣告你的函式: {* ../../docs_src/path_params_numeric_validations/tutorial002_py310.py hl[7] *} 但請記住,若使用 `Annotated`,你就不會有這個問題,因為你不是用函式參數預設值來放 `Query()` 或 `Path()`。 {* ../../docs_src/path_params_numeric_validations/tutorial002_an_py310.py *} ## 依需求調整參數順序的技巧 { #order-the-parameters-as-you-need-tricks } /// tip 如果你使用 `Annotated`,這點大概沒那麼重要或必要。 ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 5.8K bytes - Click Count (0) -
docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md
응답을 생성하기 전에는 `yield`문을 포함하여 그 이전의 코드만이 실행됩니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *} yield된 값은 *경로 처리* 및 다른 의존성들에 주입되는 값 입니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[4] *} `yield`문 다음의 코드는 응답을 생성한 후 실행됩니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[5:6] *} /// tip `async` 함수와 일반 함수 모두 사용할 수 있습니다. **FastAPI**는 일반 의존성과 마찬가지로 각각의 함수를 올바르게 처리할 것입니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 14.3K bytes - Click Count (0) -
docs/en/docs/how-to/extending-openapi.md
{* ../../docs_src/extending_openapi/tutorial001_py310.py hl[1,4,7:9] *} ### Generate the OpenAPI schema { #generate-the-openapi-schema } Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function: {* ../../docs_src/extending_openapi/tutorial001_py310.py hl[2,15:21] *} ### Modify the OpenAPI schema { #modify-the-openapi-schema }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 3.3K bytes - Click Count (0)