Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 61 - 70 of 414 for tutorial001_an_py310 (0.08 seconds)

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

  1. docs/zh-hant/docs/how-to/authentication-error-status-code.md

    但如果你的用戶端因某些原因依賴於舊行為,你可以在你的 security 類別中覆寫 `make_not_authenticated_error` 方法以恢復舊的行為。
    
    例如,你可以建立 `HTTPBearer` 的子類別,讓它回傳 `403 Forbidden` 錯誤,而不是預設的 `401 Unauthorized` 錯誤:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip
    注意這個函式回傳的是例外物件本身,而不是直接拋出它。拋出的動作會在其餘的內部程式碼中處理。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/query-param-models.md

    Declare the **query parameters** that you need in a **Pydantic model**, and then declare the parameter as `Query`:
    
    {* ../../docs_src/query_param_models/tutorial001_an_py310.py hl[9:13,17] *}
    
    **FastAPI** will **extract** the data for **each field** from the **query parameters** 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.2K bytes
    - Click Count (0)
  3. docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md

    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *}
    
    클래스의 인스턴스를 만들 때 사용하는 `__init__` 메서드에 주목하세요:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *}
    
    ...이전의 `common_parameters`와 동일한 매개변수를 가지고 있습니다:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *}
    
    이 매개변수들이 **FastAPI**가 의존성을 "해결"하는 데 사용할 것들입니다.
    
    두 경우 모두 다음을 갖게 됩니다:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 8K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/header-param-models.md

    ///
    
    ## 使用 Pydantic 模型的 Header 参数 { #header-parameters-with-a-pydantic-model }
    
    在 **Pydantic 模型**中声明所需的 **header 参数**,然后将参数声明为 `Header` :
    
    {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *}
    
    **FastAPI** 将从请求中接收到的 **headers** 中**提取**出**每个字段**的数据,并提供您定义的 Pydantic 模型。
    
    ## 查看文档 { #check-the-docs }
    
    您可以在文档 UI 的 `/docs` 中查看所需的 headers:
    
    <div class="screenshot">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:39:41 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  5. docs/ja/docs/how-to/custom-request-and-route.md

    同じアプローチを使って、例外ハンドラ内でリクエストボディにアクセスすることもできます。
    
    やることは、`try`/`except` ブロックの中でリクエストを処理するだけです:
    
    {* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[14,16] *}
    
    例外が発生しても、`Request` インスタンスはスコープ内に残るため、エラー処理時にリクエストボディを読み取り、活用できます:
    
    {* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[17:19] *}
    
    ## ルーターでのカスタム `APIRoute` クラス { #custom-apiroute-class-in-a-router }
    
    `APIRouter` の `route_class` パラメータを設定することもできます:
    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)
  6. docs/en/docs/tutorial/cookie-param-models.md

    ## Cookies with a Pydantic Model { #cookies-with-a-pydantic-model }
    
    Declare the **cookie** parameters that you need in a **Pydantic model**, and then declare the parameter as `Cookie`:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI** will **extract** the data for **each field** from the **cookies** received 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: Tue Feb 10 11:48:27 GMT 2026
    - 3.1K bytes
    - Click Count (0)
  7. 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)
  8. docs/en/docs/tutorial/request-form-models.md

    You just need to declare a **Pydantic model** with the fields you want to receive as **form fields**, and then declare the parameter as `Form`:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py310.py hl[9:11,15] *}
    
    **FastAPI** will **extract** the data for **each field** from the **form data** 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: Thu Mar 05 18:13:19 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  9. docs/ko/docs/tutorial/header-param-models.md

    ///
    
    ## Pydantic 모델을 사용한 헤더 매개변수 { #header-parameters-with-a-pydantic-model }
    
    **Pydantic 모델**에 필요한 **헤더 매개변수**를 선언한 다음, 해당 매개변수를 `Header`로 선언합니다:
    
    {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *}
    
    **FastAPI**는 요청에서 받은 **헤더**에서 **각 필드**에 대한 데이터를 **추출**하고 정의한 Pydantic 모델을 줍니다.
    
    ## 문서 확인하기 { #check-the-docs }
    
    문서 UI `/docs`에서 필요한 헤더를 볼 수 있습니다:
    
    <div class="screenshot">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 2.9K bytes
    - Click Count (0)
  10. docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md

    所以,我们可以将上面的依赖项 "可依赖对象" `common_parameters` 更改为类 `CommonQueryParams`:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *}
    
    注意用于创建类实例的 `__init__` 方法:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *}
    
    ...它与我们以前的 `common_parameters` 具有相同的参数:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *}
    
    这些参数就是 **FastAPI** 用来 "处理" 依赖项的。
    
    在两个例子下,都有:
    
    * 一个可选的 `q` 查询参数,是 `str` 类型。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 6.8K bytes
    - Click Count (0)
Back to Top