- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 406 for tutorial001_an_py310 (0.12 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/ko/docs/how-to/authentication-error-status-code.md
예를 들어, 기본값인 `401 Unauthorized` 오류 대신 `403 Forbidden` 오류를 반환하는 `HTTPBearer`의 서브클래스를 만들 수 있습니다: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *} /// tip | 팁 함수는 예외를 `return`하는 것이지 `raise`하지 않는다는 점에 유의하세요. 예외를 발생시키는(`raise`) 작업은 내부 코드의 나머지 부분에서 수행됩니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 1.3K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/index.md
### Import `Depends` { #import-depends } {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *} ### Declare the dependency, in the "dependant" { #declare-the-dependency-in-the-dependant } The same way you use `Body`, `Query`, etc. with your *path operation function* parameters, use `Depends` with a new parameter: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[13,18] *}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) -
docs/en/docs/how-to/authentication-error-status-code.md
For example, you can create a subclass of `HTTPBearer` that returns a `403 Forbidden` error instead of the default `401 Unauthorized` error: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *} /// tip Notice that the function returns the exception instance, it doesn't raise it. The raising is done in the rest of the internal code.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1.2K bytes - Click Count (0) -
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/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/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) -
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/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)