Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 161 - 170 of 737 for Tip (0.01 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh/docs/tutorial/body-updates.md

        * 这类似于再次调用模型的 `.model_dump()` 方法,但会确保(并转换)值为可转换为 JSON 的数据类型,例如把 `datetime` 转换为 `str`。
    * 把数据保存至数据库。
    * 返回更新后的模型。
    
    {* ../../docs_src/body_updates/tutorial002_py310.py hl[28:35] *}
    
    /// tip | 提示
    
    实际上,HTTP `PUT` 也可以使用同样的技巧。
    
    但这里用 `PATCH` 举例,因为它就是为这种用例设计的。
    
    ///
    
    /// note | 注意
    
    注意,输入模型仍会被验证。
    
    因此,如果希望接收的部分更新可以省略所有属性,则需要一个所有属性都标记为可选(带默认值或 `None`)的模型。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  2. docs/en/docs/advanced/response-directly.md

    You could also create a `JSONResponse` directly and return it.
    
    /// tip
    
    You will normally have much better performance using a [Response Model](../tutorial/response-model.md) than returning a `JSONResponse` directly, as that way it serializes the data using Pydantic, in Rust.
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4K bytes
    - Click Count (0)
  3. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java

            // the tip of the previous major is unreleased for sure, be it a minor or a bugfix
            final Version latestOfPreviousMajor = getLatestVersionByKey(this.groupByMajor, currentVersion.getMajor() - 1);
            unreleased.add(latestOfPreviousMajor);
            if (latestOfPreviousMajor.getRevision() == 0) {
                // if the previous major is a x.y.0 release, then the tip of the minor before that (y-1) is also unreleased
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 16.8K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/schema-extra-example.md

    你可以使用屬性 `model_config`(接收一個 `dict`),詳見 [Pydantic 文件:Configuration](https://docs.pydantic.dev/latest/api/config/)。
    
    你可以將 `"json_schema_extra"` 設為一個 `dict`,其中包含你想在產生的 JSON Schema 中出現的任何額外資料,包括 `examples`。
    
    /// tip
    
    你可以用相同技巧擴充 JSON Schema,加入你自己的自訂額外資訊。
    
    例如,你可以用它為前端使用者介面新增中繼資料等。
    
    ///
    
    /// info
    
    OpenAPI 3.1.0(自 FastAPI 0.99.0 起使用)新增了對 `examples` 的支援,這是 **JSON Schema** 標準的一部分。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  5. docs/ko/docs/tutorial/security/get-current-user.md

    {* ../../docs_src/security/tutorial002_an_py310.py hl[31] *}
    
    `current_user`의 타입을 Pydantic 모델 `User`로 선언한다는 점에 주목하세요.
    
    이는 함수 내부에서 자동 완성과 타입 체크에 도움을 줍니다.
    
    /// tip | 팁
    
    요청 본문도 Pydantic 모델로 선언된다는 것을 기억하실지도 모릅니다.
    
    여기서 **FastAPI**는 `Depends`를 사용하고 있기 때문에 혼동하지 않습니다.
    
    ///
    
    /// check | 확인
    
    이 의존성 시스템이 설계된 방식은 모두 `User` 모델을 반환하는 서로 다른 의존성(서로 다른 "dependables")을 가질 수 있도록 합니다.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/security/get-current-user.md

    Notice that we declare the type of `current_user` as the Pydantic model `User`.
    
    This will help us inside of the function with all the completion and type checks.
    
    /// tip
    
    You might remember that request bodies are also declared with Pydantic models.
    
    Here **FastAPI** won't get confused because you are using `Depends`.
    
    ///
    
    /// check
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 4K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/security/get-current-user.md

    在*路径操作* 的 `Depends` 中使用 `get_current_user`:
    
    {* ../../docs_src/security/tutorial002_an_py310.py hl[31] *}
    
    注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。
    
    这有助于在函数内部使用代码补全和类型检查。
    
    /// tip | 提示
    
    还记得请求体也是使用 Pydantic 模型声明的吧。
    
    放心,因为使用了 `Depends`,**FastAPI** 不会搞混。
    
    ///
    
    /// check | 检查
    
    依赖系统的这种设计方式可以支持不同的依赖项返回同一个 `User` 模型。
    
    而不是局限于只能有一个返回该类型数据的依赖项。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 3.6K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/advanced/custom-response.md

    一個 `async` 任務只能在抵達某個 `await` 時才能被取消。如果沒有 `await`,該產生器(帶有 `yield` 的函式)將無法被正確取消,甚至在請求取消後仍可能持續執行。
    
    因為這個小範例不需要任何 `await` 陳述式,我們加入 `await anyio.sleep(0)`,讓事件迴圈有機會處理取消。
    
    對於大型或無限的串流來說,這點更為重要。
    
    ///
    
    /// tip
    
    與其直接回傳 `StreamingResponse`,你大概會想遵循[資料串流](./stream-data.md)中的作法,這樣更方便,並且會在底層幫你處理取消。
    
    如果你要串流 JSON Lines,請參考教學:[串流 JSON Lines](../tutorial/stream-json-lines.md)。
    
    ///
    
    ### `FileResponse` { #fileresponse }
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/advanced/generate-clients.md

    針對 **TypeScript 用戶端**,[Hey API](https://heyapi.dev/) 是專門打造的解決方案,為 TypeScript 生態系提供最佳化的體驗。
    
    你可以在 [OpenAPI.Tools](https://openapi.tools/#sdk) 找到更多 SDK 產生器。
    
    /// tip
    
    FastAPI 會自動產生 **OpenAPI 3.1** 規格,因此你使用的任何工具都必須支援這個版本。
    
    ///
    
    ## 來自 FastAPI 贊助商的 SDK 產生器 { #sdk-generators-from-fastapi-sponsors }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 9.1K bytes
    - Click Count (0)
  10. docs/es/docs/tutorial/first-steps.md

          <span style="background-color:#007166"><font color="#D3D7CF"> tip </font></span>  Running in development mode, for production use:
                 <b>fastapi run</b>
    
                 Logs:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 13.9K bytes
    - Click Count (0)
Back to Top