- Sort Score
- Num 10 results
- Language All
Results 61 - 70 of 391 for tutorial001_an_py310 (0.12 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/zh/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial003_an_py310.py hl[10] *} ## 数值校验:大于等于 { #number-validations-greater-than-or-equal } 使用 `Query` 和 `Path`(以及你稍后会看到的其他类)你可以声明数值约束。 在这里,使用 `ge=1` 后,`item_id` 必须是一个整数,值要「`g`reater than or `e`qual」1。 {* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6K bytes - Click Count (0) -
docs/zh/docs/how-to/authentication-error-status-code.md
但如果由于某些原因你的客户端依赖旧行为,你可以在你的安全类中重写方法 `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:06:37 GMT 2026 - 1.1K bytes - Click Count (0) -
docs/en/docs/advanced/additional-status-codes.md
To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want: {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *} /// warning When you return a `Response` directly, like in the example above, it will be returned directly. It won't be serialized with a model, etc.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/custom-request-and-route.md
{* ../../docs_src/custom_request_and_route/tutorial001_an_py310.py hl[9:16] *} ### 建立自訂的 `GzipRoute` 類別 { #create-a-custom-gziproute-class } 接著,我們建立 `fastapi.routing.APIRoute` 的自訂子類別,讓它使用 `GzipRequest`。 這次,它會覆寫 `APIRoute.get_route_handler()` 方法。 這個方法會回傳一個函式,而該函式會接收請求並回傳回應。 在這裡,我們用它將原始的請求包裝成 `GzipRequest`。 {* ../../docs_src/custom_request_and_route/tutorial001_an_py310.py hl[19:27] *} /// note | 技術細節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) -
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) -
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) -
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) -
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) -
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) -
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)