Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 121 - 130 of 979 for tutorial006_py310 (0.28 seconds)

  1. docs/fr/docs/tutorial/server-sent-events.md

    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *}
    
    Chaque élément produit avec `yield` est encodé en JSON et envoyé dans le champ `data:` d’un événement SSE.
    
    Si vous déclarez le type de retour comme `AsyncIterable[Item]`, FastAPI l’utilisera pour **valider**, **documenter** et **sérialiser** les données avec Pydantic.
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:33:45 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  2. 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)
  3. docs/zh/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:29:48 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  4. docs/ru/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py310.py hl[17] *}
    
    #### Получение *значения перечисления* { #get-the-enumeration-value }
    
    Можно получить фактическое значение (в данном случае - `str`) с помощью `model_name.value` или в общем случае `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py310.py hl[20] *}
    
    /// tip | Подсказка
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 14K bytes
    - Click Count (0)
  5. docs/ko/docs/tutorial/server-sent-events.md

    `EventSourceResponse`는 `fastapi.sse`에서 임포트합니다:
    
    {* ../../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 | 팁
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:56:39 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  6. docs/uk/docs/tutorial/extra-models.md

    ///
    
    ## Кілька моделей { #multiple-models }
    
    Ось загальна ідея того, як можуть виглядати моделі з їхніми полями пароля та місцями використання:
    
    {* ../../docs_src/extra_models/tutorial001_py310.py hl[7,9,14,20,22,27:28,31:33,38:39] *}
    
    ### Про `**user_in.model_dump()` { #about-user-in-model-dump }
    
    #### `.model_dump()` у Pydantic { #pydantics-model-dump }
    
    `user_in` - це модель Pydantic класу `UserIn`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  7. docs/de/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py310.py hl[17] *}
    
    #### *Enumerations-Wert* erhalten { #get-the-enumeration-value }
    
    Den tatsächlichen Wert (in diesem Fall ein `str`) erhalten Sie via `model_name.value`, oder generell, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py310.py hl[20] *}
    
    /// tip | Tipp
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 10K bytes
    - Click Count (0)
  8. docs/tr/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py310.py hl[17] *}
    
    #### *Enumeration Value*'yu Alalım { #get-the-enumeration-value }
    
    Gerçek değeri (bu durumda bir `str`) `model_name.value` ile veya genel olarak `your_enum_member.value` ile alabilirsiniz:
    
    {* ../../docs_src/path_params/tutorial005_py310.py hl[20] *}
    
    /// tip | İpucu
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 9.7K bytes
    - Click Count (0)
  9. docs/pt/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py310.py hl[17] *}
    
    #### Obtenha o valor da enumeração { #get-the-enumeration-value }
    
    Você pode obter o valor real (um `str` neste caso) usando `model_name.value`, ou, em geral, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py310.py hl[20] *}
    
    /// tip | Dica
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  10. docs/zh/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial001_py310.py hl[6:7] *}
    
    路径参数 `item_id` 的值会作为参数 `item_id` 传递给你的函数。
    
    运行示例并访问 [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo),可获得如下响应:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## 声明路径参数的类型 { #path-parameters-with-types }
    
    使用 Python 标准类型注解,声明路径操作函数中路径参数的类型:
    
    {* ../../docs_src/path_params/tutorial002_py310.py hl[7] *}
    
    本例把 `item_id` 的类型声明为 `int`。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 7.6K bytes
    - Click Count (0)
Back to Top