- Sort Score
- Num 10 results
- Language All
Results 871 - 880 of 2,110 for py$ (0.01 seconds)
-
docs/en/docs/tutorial/path-params.md
{* ../../docs_src/path_params/tutorial003_py310.py hl[6,11] *} Otherwise, the path for `/users/{user_id}` would match also for `/users/me`, "thinking" that it's receiving a parameter `user_id` with a value of `"me"`. Similarly, you cannot redefine a path operation: {* ../../docs_src/path_params/tutorial003b_py310.py hl[6,11] *} The first one will always be used since the path matches first.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-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/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) -
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) -
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/tutorial/header-param-models.md
Declare the **header parameters** that you need in a **Pydantic model**, and then declare the parameter as `Header`: {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *} **FastAPI** will **extract** the data for **each field** from the **headers** in the request and give you the Pydantic model you defined. ## Check the Docs { #check-the-docs }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 2.6K bytes - Click Count (0)