Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 171 - 180 of 919 for tip (0.01 seconds)

  1. docs/en/docs/tutorial/dependencies/index.md

    You **don't call it** directly (don't add the parenthesis at the end), you just pass it as a parameter to `Depends()`.
    
    And that function takes parameters in the same way that *path operation functions* do.
    
    /// tip
    
    You'll see what other "things", apart from functions, can be used as dependencies in the next chapter.
    
    ///
    
    Whenever a new request arrives, **FastAPI** will take care of:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/advanced/json-base64-bytes.md

    <div class="screenshot">
    <img src="/img/tutorial/json-base64-bytes/image01.png">
    </div>
    
    你可以發送如下的請求:
    
    ```json
    {
        "description": "Some data",
        "data": "aGVsbG8="
    }
    ```
    
    /// tip
    
    `aGVsbG8=` 是 `hello` 的 base64 編碼。
    
    ///
    
    接著 Pydantic 會將該 base64 字串解碼,並在模型的 `data` 欄位中提供原始位元組。
    
    你會收到類似以下的回應:
    
    ```json
    {
      "description": "Some data",
      "content": "hello"
    }
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/generate-clients.md

    You can discover more SDK generators on [OpenAPI.Tools](https://openapi.tools/#sdk).
    
    /// tip
    
    FastAPI automatically generates **OpenAPI 3.1** specifications, so any tool you use must support this version.
    
    ///
    
    ## SDK Generators from FastAPI Sponsors { #sdk-generators-from-fastapi-sponsors }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9.7K bytes
    - Click Count (1)
  4. docs/zh/docs/how-to/custom-docs-ui-assets.md

    - `swagger_css_url`:你的 Swagger UI 文档 HTML 获取**CSS** 文件的 URL。这里是自定义的 CDN URL。
    
    ReDoc 也类似...
    
    {* ../../docs_src/custom_docs_ui/tutorial001_py310.py hl[2:6,11:19,22:24,27:33] *}
    
    /// tip | 提示
    
    `swagger_ui_redirect` 的*路径操作*是在你使用 OAuth2 时的一个辅助。
    
    如果你把 API 与某个 OAuth2 提供方集成,你就可以完成认证并带着获取到的凭据回到 API 文档里。然后使用真实的 OAuth2 认证与之交互。
    
    Swagger UI 会在幕后为你处理这些,但它需要这个“重定向”辅助路径。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  5. docs/en/docs/how-to/custom-docs-ui-assets.md

    And similarly for ReDoc...
    
    {* ../../docs_src/custom_docs_ui/tutorial001_py310.py hl[2:6,11:19,22:24,27:33] *}
    
    /// tip
    
    The *path operation* for `swagger_ui_redirect` is a helper for when you use OAuth2.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/request-forms.md

    使用 `Form` 時,你可以宣告與 `Body`(以及 `Query`、`Path`、`Cookie`)相同的設定,包括驗證、範例、別名(例如用 `user-name` 取代 `username`)等。
    
    /// info
    
    `Form` 是一個直接繼承自 `Body` 的類別。
    
    ///
    
    /// tip
    
    要宣告表單的請求本文,你需要明確使用 `Form`,否則這些參數會被解讀為查詢參數或請求本文(JSON)參數。
    
    ///
    
    ## 關於「表單欄位」 { #about-form-fields }
    
    HTML 表單(`<form></form>`)向伺服器傳送資料時,通常會使用一種「特殊」的編碼方式,與 JSON 不同。
    
    **FastAPI** 會從正確的位置讀取那些資料,而不是從 JSON。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/cookie-param-models.md

    This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎
    
    /// note
    
    This is supported since FastAPI version `0.115.0`. 🤓
    
    ///
    
    /// tip
    
    This same technique applies to `Query`, `Cookie`, and `Header`. 😎
    
    ///
    
    ## Cookies with a Pydantic Model { #cookies-with-a-pydantic-model }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 10 11:48:27 GMT 2026
    - 3.1K bytes
    - Click Count (0)
  8. docs/en/docs/advanced/templates.md

    Before FastAPI 0.108.0, Starlette 0.29.0, the `name` was the first parameter.
    
    Also, before that, in previous versions, the `request` object was passed as part of the key-value pairs in the context for Jinja2.
    
    ///
    
    /// tip
    
    By declaring `response_class=HTMLResponse` the docs UI will be able to know that the response will be HTML.
    
    ///
    
    /// note | Technical Details
    
    You could also use `from starlette.templating import Jinja2Templates`.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/deployment/concepts.md

    即便如此,你大概也不會希望應用因為某處錯誤就一直處於死亡狀態,你可能會希望它「繼續運作」,至少讓沒有壞掉的「路徑操作(path operations)」能持續服務。
    
    ### 當機後重新啟動 { #restart-after-crash }
    
    在這些會讓「執行中行程」整個崩潰的嚴重錯誤案例裡,你會希望有個外部元件負責「重新啟動」該行程,至少嘗試幾次...
    
    /// tip
    
    ...不過,如果整個應用「一啟動就立刻」崩潰,那持續無止境地重啟大概沒有意義。但在這類情況下,你很可能會在開發過程中就發現,或至少在部署後馬上注意到。
    
    所以讓我們專注在主要情境:應用在未來某些特定案例中可能會整體崩潰,但此時重新啟動仍然是有意義的。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 16.1K bytes
    - Click Count (0)
  10. docs/ko/docs/tutorial/request-forms.md

    `Form`을 사용하면 유효성 검사, 예제, 별칭(예: `username` 대신 `user-name`) 등을 포함하여 `Body`(및 `Query`, `Path`, `Cookie`)와 동일한 구성을 선언할 수 있습니다.
    
    /// info | 정보
    
    `Form`은 `Body`에서 직접 상속되는 클래스입니다.
    
    ///
    
    /// tip | 팁
    
    폼 본문을 선언할 때는 `Form`을 명시적으로 사용해야 합니다. 그렇지 않으면 매개변수가 쿼리 매개변수나 본문(JSON) 매개변수로 해석됩니다.
    
    ///
    
    ## "폼 필드"에 대해 { #about-form-fields }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 3K bytes
    - Click Count (0)
Back to Top