- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 488 for advanced (0.07 seconds)
-
docs/en/docs/advanced/advanced-dependencies.md
# Advanced Dependencies { #advanced-dependencies } ## Parameterized dependencies { #parameterized-dependencies } All the dependencies we have seen are a fixed function or class. But there could be cases where you want to be able to set parameters on the dependency, without having to declare many different functions or classes. Let's imagine that we want to have a dependency that checks if the query parameter `q` contains some fixed content.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9K bytes - Click Count (0) -
docs/ja/docs/advanced/advanced-dependencies.md
# 高度な依存関係 { #advanced-dependencies } ## パラメータ化された依存関係 { #parameterized-dependencies } これまで見てきた依存関係は、固定の関数またはクラスでした。 しかし、多くの異なる関数やクラスを宣言せずに、その依存関係にパラメータを設定したい場合があります。 たとえば、クエリパラメータ `q` に、ある固定の内容が含まれているかを検査する依存関係が欲しいとします。 ただし、その固定の内容はパラメータ化できるようにしたいです。 ## "callable" なインスタンス { #a-callable-instance } Python には、クラスのインスタンスを "callable" にする方法があります。 クラス自体(これはすでに callable です)ではなく、そのクラスのインスタンスです。 そのためには、`__call__` メソッドを宣言します:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.4K bytes - Click Count (0) -
docs/en/docs/advanced/advanced-python-types.md
# Advanced Python Types { #advanced-python-types } Here are some additional ideas that might be useful when working with Python types. ## Using `Union` or `Optional` { #using-union-or-optional } If your code for some reason can't use `|`, for example if it's not in a type annotation but in something like `response_model=`, instead of using the vertical bar (`|`) you can use `Union` from `typing`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 2K bytes - Click Count (0) -
docs/ko/docs/advanced/advanced-python-types.md
# 고급 Python 타입 { #advanced-python-types } Python 타입을 다룰 때 유용할 수 있는 몇 가지 추가 아이디어를 소개합니다. ## `Union` 또는 `Optional` 사용 { #using-union-or-optional } 어떤 이유로 코드에서 `|`를 사용할 수 없다면, 예를 들어 타입 어노테이션이 아니라 `response_model=` 같은 곳이라면, 파이프 문자(`|`) 대신 `typing`의 `Union`을 사용할 수 있습니다. 예를 들어, 어떤 값이 `str` 또는 `None`이 될 수 있다고 선언할 수 있습니다: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 2.4K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/advanced-python-types.md
# 進階 Python 型別 { #advanced-python-types } 以下是一些在使用 Python 型別時可能有用的額外想法。 ## 使用 `Union` 或 `Optional` { #using-union-or-optional } 如果你的程式碼因某些原因無法使用 `|`,例如不是在型別註記中,而是在像 `response_model=` 之類的參數位置,那麼你可以用 `typing` 中的 `Union` 來取代豎線(`|`)。 例如,你可以宣告某個值可以是 `str` 或 `None`: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ``` 在 `typing` 中也有用 `Optional` 宣告某個值可以是 `None` 的速記法。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 1.9K bytes - Click Count (0) -
docs/en/docs/advanced/path-operation-advanced-configuration.md
# Path Operation Advanced Configuration { #path-operation-advanced-configuration } ## OpenAPI operationId { #openapi-operationid } /// warning If you are not an "expert" in OpenAPI, you probably don't need this. /// You can set the OpenAPI `operationId` to be used in your *path operation* with the parameter `operation_id`. You would have to make sure that it is unique for each operation.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 7.1K bytes - Click Count (0) -
docs/zh/docs/advanced/advanced-python-types.md
# 高级 Python 类型 { #advanced-python-types } 这里有一些在使用 Python 类型时可能有用的额外想法。 ## 使用 `Union` 或 `Optional` { #using-union-or-optional } 如果你的代码因为某些原因不能使用 `|`,例如它不是在类型注解里,而是在 `response_model=` 之类的参数中,那么你可以使用 `typing` 中的 `Union` 来代替竖线(`|`)。 例如,你可以声明某个值可以是 `str` 或 `None`: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ``` `typing` 也提供了一个声明“可能为 `None`”的快捷方式:`Optional`。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 2K bytes - Click Count (0) -
docs/ja/docs/advanced/advanced-python-types.md
# 高度な Python の型 { #advanced-python-types } Python の型を扱うときに役立つ追加のアイデアをいくつか紹介します。 ## `Union` または `Optional` の利用 { #using-union-or-optional } 何らかの理由で `|` が使えない場合、たとえば型アノテーションではなく `response_model=` のような場所では、縦棒(`|`)の代わりに `typing` の `Union` を使えます。 例えば、`str` または `None` になり得ることを宣言できます: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 2.4K bytes - Click Count (0) -
docs/ko/docs/advanced/path-operation-advanced-configuration.md
# 경로 처리 고급 구성 { #path-operation-advanced-configuration } ## OpenAPI operationId { #openapi-operationid } /// warning | 경고 OpenAPI “전문가”가 아니라면, 아마 이 내용은 필요하지 않을 것입니다. /// 매개변수 `operation_id`를 사용해 *경로 처리*에 사용할 OpenAPI `operationId`를 설정할 수 있습니다. 각 작업마다 고유하도록 보장해야 합니다. {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *}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) -
docs/zh/docs/advanced/path-operation-advanced-configuration.md
# 路径操作的高级配置 { #path-operation-advanced-configuration } ## OpenAPI 的 operationId { #openapi-operationid } /// warning 如果你并非 OpenAPI 的“专家”,你可能不需要这部分内容。 /// 你可以在 *路径操作* 中通过参数 `operation_id` 设置要使用的 OpenAPI `operationId`。 务必确保每个操作的 `operation_id` 都是唯一的。 {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *} ### 使用 *路径操作函数* 的函数名作为 operationId { #using-the-path-operation-function-name-as-the-operationid }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6.7K bytes - Click Count (0)