- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 10 for PlaneItem (0.1 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/en/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` in Python 3.10 { #union-in-python-3-10 } In this example we pass `Union[PlaneItem, CarItem]` as the value of the argument `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.7K bytes - Click Count (0) -
docs_src/extra_models/tutorial003_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class BaseItem(BaseModel): description: str type: str class CarItem(BaseItem): type: str = "car" class PlaneItem(BaseItem): type: str = "plane" size: int items = { "item1": {"description": "All my friends drive a low rider", "type": "car"}, "item2": {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 612 bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/extra-models.md
在定義 [`Union`](https://docs.pydantic.dev/latest/concepts/types/#unions) 時,請先放置「更具體」的型別,再放「較不具體」的型別。以下範例中,較具體的 `PlaneItem` 置於 `CarItem` 之前:`Union[PlaneItem, CarItem]`。 /// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### Python 3.10 中的 `Union` { #union-in-python-3-10 } 此範例中,我們將 `Union[PlaneItem, CarItem]` 作為引數 `response_model` 的值。 由於這裡是把它當作引數的「值」傳入,而非用於型別註記,因此即使在 Python 3.10 也必須使用 `Union`。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.3K bytes - Click Count (0) -
docs/es/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` en Python 3.10 { #union-in-python-3-10 } En este ejemplo pasamos `Union[PlaneItem, CarItem]` como el valor del argumento `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/uk/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` у Python 3.10 { #union-in-python-3-10 } У цьому прикладі ми передаємо `Union[PlaneItem, CarItem]` як значення аргументу `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/tr/docs/tutorial/extra-models.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 7.4K bytes - Click Count (0) -
docs/pt/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` no Python 3.10 { #union-in-python-3-10 } Neste exemplo, passamos `Union[PlaneItem, CarItem]` como o valor do argumento `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 7.1K bytes - Click Count (0) -
docs/de/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` in Python 3.10 { #union-in-python-3-10 } In diesem Beispiel übergeben wir `Union[PlaneItem, CarItem]` als Wert des Arguments `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 7.7K bytes - Click Count (0) -
docs/ko/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### Python 3.10에서 `Union` { #union-in-python-3-10 } 위의 예제에서는 `response_model` 인자 값으로 `Union[PlaneItem, CarItem]`을 전달합니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 8K bytes - Click Count (0) -
docs/ja/docs/tutorial/extra-models.md
[`Union`](https://docs.pydantic.dev/latest/concepts/types/#unions)を定義する場合は、最も具体的な型を先に、その後により具体性の低い型を含めてください。以下の例では、より具体的な`PlaneItem`が`Union[PlaneItem, CarItem]`内で`CarItem`より前に来ています。 /// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### Python 3.10の`Union` { #union-in-python-3-10 } この例では、引数`response_model`の値として`Union[PlaneItem, CarItem]`を渡しています。 **型アノテーション**に書くのではなく、**引数の値**として渡しているため、Python 3.10でも`Union`を使う必要があります。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 8.1K bytes - Click Count (0)