Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 201 - 210 of 849 for Tutorial (0.07 seconds)

  1. docs/ko/docs/advanced/path-operation-advanced-configuration.md

    {* ../../docs_src/path_operation_advanced_configuration/tutorial005_py310.py hl[6] *}
    
    자동 API 문서를 열면, 해당 특정 *경로 처리*의 하단에 확장이 표시됩니다.
    
    <img src="/img/tutorial/path-operation-advanced-configuration/image01.png">
    
    또한 API의 `/openapi.json`에서 결과 OpenAPI를 보면, 특정 *경로 처리*의 일부로 확장이 포함된 것도 확인할 수 있습니다:
    
    ```JSON hl_lines="22"
    {
        "openapi": "3.1.0",
        "info": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  2. docs/ja/docs/tutorial/index.md

    # チュートリアル - ユーザーガイド { #tutorial-user-guide }
    
    このチュートリアルでは、**FastAPI**のほとんどの機能を使う方法を段階的に紹介します。
    
    各セクションは前のセクションを踏まえた内容になっています。しかし、トピックごとに分割されているので、特定のAPIのニーズを満たすために、任意の特定のトピックに直接進めるようになっています。
    
    また、将来的にリファレンスとして機能するように構築されているので、後で戻ってきて必要なものを正確に確認できます。
    
    ## コードを実行する { #run-the-code }
    
    すべてのコードブロックをコピーして直接使用できます(実際にテストされたPythonファイルです)。
    
    いずれかの例を実行するには、コードを `main.py`ファイルにコピーし、次のように `fastapi dev` を起動します:
    
    <div class="termy">
    
    ```console
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  3. docs/zh/docs/advanced/security/http-basic-auth.md

    * 返回类型为 `HTTPBasicCredentials` 的对象:
        * 包含发送的 `username` 与 `password`
    
    {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}
    
    第一次打开 URL(或在 API 文档中点击 **Execute** 按钮)时,浏览器要求输入用户名与密码:
    
    <img src="/img/tutorial/security/image12.png">
    
    ## 检查用户名 { #check-the-username }
    
    以下是更完整的示例。
    
    使用依赖项检查用户名与密码是否正确。
    
    为此要使用 Python 标准模块 [`secrets`](https://docs.python.org/3/library/secrets.html) 检查用户名与密码。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    But declaring the type is encouraged as that way your editor will know what will be passed as the parameter `commons`, and then it can help you with code completion, type checks, etc:
    
    <img src="/img/tutorial/dependencies/image02.png">
    
    ## Shortcut { #shortcut }
    
    But you see that we are having some code repetition here, writing `CommonQueryParams` twice:
    
    //// tab | Python 3.10+
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  5. docs/en/docs/tutorial/response-model.md

    When you see the automatic docs, you can check that the input model and output model will both have their own JSON Schema:
    
    <img src="/img/tutorial/response-model/image01.png">
    
    And both models will be used for the interactive API documentation:
    
    <img src="/img/tutorial/response-model/image02.png">
    
    ## Other Return Type Annotations { #other-return-type-annotations }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 15.5K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/advanced/stream-data.md

    # 串流資料 { #stream-data }
    
    如果你要串流可用 JSON 結構化的資料,應該[串流 JSON Lines](../tutorial/stream-json-lines.md)。
    
    但如果你想串流純二進位資料或字串,以下是做法。
    
    /// info
    
    已在 FastAPI 0.134.0 新增。
    
    ///
    
    ## 使用情境 { #use-cases }
    
    當你想串流純字串時可以用這個機制,例如直接轉發來自 AI LLM 服務的輸出。
    
    你也可以用它來串流大型二進位檔案,邊讀邊將每個區塊(chunk)串流出去,而不必一次把整個檔案載入記憶體。
    
    你也可以用同樣方式串流視訊或音訊,甚至可以在處理的同時即時產生並傳送。
    
    ## 使用 `yield` 的 `StreamingResponse` { #a-streamingresponse-with-yield }
    
    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)
  7. docs/zh-hant/docs/advanced/security/http-basic-auth.md

    - 它會回傳一個 `HTTPBasicCredentials` 型別的物件:
        - 其中包含傳來的 `username` 與 `password`。
    
    {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *}
    
    當你第一次嘗試開啟該 URL(或在文件中點擊 "Execute" 按鈕)時,瀏覽器會要求輸入你的使用者名稱與密碼:
    
    <img src="/img/tutorial/security/image12.png">
    
    ## 檢查使用者名稱 { #check-the-username }
    
    以下是一個更完整的範例。
    
    使用一個依賴來檢查使用者名稱與密碼是否正確。
    
    為此,使用 Python 標準模組 [`secrets`](https://docs.python.org/3/library/secrets.html) 來比對使用者名稱與密碼。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  8. docs/ja/docs/how-to/custom-request-and-route.md

    ## 例外ハンドラでのリクエストボディへのアクセス { #accessing-the-request-body-in-an-exception-handler }
    
    /// tip | 豆知識
    
    同じ問題を解決するには、`RequestValidationError` 用のカスタムハンドラで `body` を使う方がずっと簡単でしょう([エラー処理](../tutorial/handling-errors.md#use-the-requestvalidationerror-body))。
    
    ただし、この例も有効で、内部コンポーネントとどのようにやり取りするかを示しています。
    
    ///
    
    同じアプローチを使って、例外ハンドラ内でリクエストボディにアクセスすることもできます。
    
    やることは、`try`/`except` ブロックの中でリクエストを処理するだけです:
    
    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)
  9. docs/en/docs/tutorial/testing.md

    /// tip
    
    If you want to call `async` functions in your tests apart from sending requests to your FastAPI application (e.g. asynchronous database functions), have a look at the [Async Tests](../advanced/async-tests.md) in the advanced tutorial.
    
    ///
    
    ## Separating tests { #separating-tests }
    
    In a real application, you probably would have your tests in a different file.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  10. docs/zh-hant/docs/how-to/custom-request-and-route.md

    但由於我們修改了 `GzipRequest.body`,在 **FastAPI** 需要讀取本文時,請求本文會自動解壓縮。
    
    ## 在例外處理器中存取請求本文 { #accessing-the-request-body-in-an-exception-handler }
    
    /// tip
    
    要解決相同問題,使用針對 `RequestValidationError` 的自訂處理器來讀取 `body` 通常更簡單([處理錯誤](../tutorial/handling-errors.md#use-the-requestvalidationerror-body))。
    
    但本範例仍然有效,並示範了如何與內部元件互動。
    
    ///
    
    我們也可以用同樣的方法,在例外處理器中存取請求本文。
    
    我們只需要在 `try`/`except` 區塊中處理請求即可:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.2K bytes
    - Click Count (0)
Back to Top