- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 48 for UserIn (0.04 seconds)
-
docs/en/docs/tutorial/response-model.md
`BaseUser` has the base fields. Then `UserIn` inherits from `BaseUser` and adds the `password` field, so, it will include all the fields from both models. We annotate the function return type as `BaseUser`, but we are actually returning a `UserIn` instance.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 15.5K bytes - Click Count (0) -
docs/en/docs/tutorial/extra-models.md
#### Pydantic's `.model_dump()` { #pydantics-model-dump } `user_in` is a Pydantic model of class `UserIn`. Pydantic models have a `.model_dump()` method that returns a `dict` with the model's data. So, if we create a Pydantic object `user_in` like: ```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` and then we call: ```Python
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/zh-hant/docs/tutorial/response-model.md
這是怎麼運作的?來看一下。🤓 ### 型別註解與工具支援 { #type-annotations-and-tooling } 先看看編輯器、mypy 與其他工具會怎麼看這件事。 `BaseUser` 有基礎欄位。然後 `UserIn` 繼承自 `BaseUser` 並新增 `password` 欄位,因此它會包含兩個模型的所有欄位。 我們把函式回傳型別註解為 `BaseUser`,但實際上回傳的是 `UserIn` 實例。 編輯器、mypy 與其他工具不會抱怨,因為就型別學而言,`UserIn` 是 `BaseUser` 的子類別,這代表當預期任何 `BaseUser` 時,`UserIn` 是一個有效的型別。 ### FastAPI 的資料過濾 { #fastapi-data-filtering } 對 FastAPI 而言,它會查看回傳型別,並確保你回傳的內容只包含該型別中宣告的欄位。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 14.5K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/extra-models.md
### 關於 `**user_in.model_dump()` { #about-user-in-model-dump } #### Pydantic 的 `.model_dump()` { #pydantics-model-dump } `user_in` 是一個 `UserIn` 類別的 Pydantic 模型。 Pydantic 模型有 `.model_dump()` 方法,會回傳包含該模型資料的 `dict`。 因此,若我們建立一個 Pydantic 物件 `user_in` 如: ```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` 接著呼叫: ```Python user_dict = user_in.model_dump() ```
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/uk/docs/tutorial/extra-models.md
#### `.model_dump()` у Pydantic { #pydantics-model-dump } `user_in` - це модель Pydantic класу `UserIn`. Моделі Pydantic мають метод `.model_dump()`, який повертає `dict` з даними моделі. Отже, якщо ми створимо об’єкт Pydantic `user_in` так: ```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` і викличемо: ```Python
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/response-model.md
`BaseUser` temel field’lara sahiptir. Ardından `UserIn`, `BaseUser`’dan miras alır ve `password` field’ını ekler; yani iki modelin field’larının tamamını içerir. Fonksiyonun dönüş tipini `BaseUser` olarak annotate ediyoruz ama gerçekte bir `UserIn` instance’ı döndürüyoruz.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 17K bytes - Click Count (0) -
docs/pt/docs/tutorial/response-model.md
`BaseUser` tem os campos base. Então `UserIn` herda de `BaseUser` e adiciona o campo `password`, então, ele incluirá todos os campos de ambos os modelos. Anotamos o tipo de retorno da função como `BaseUser`, mas na verdade estamos retornando uma instância `UserIn`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 16.7K bytes - Click Count (0) -
docs/de/docs/tutorial/response-model.md
`BaseUser` verfügt über die Basis-Felder. Dann erbt `UserIn` von `BaseUser` und fügt das Feld `password` hinzu, sodass es nun alle Felder beider Modelle hat. Wir annotieren den Funktionsrückgabetyp als `BaseUser`, geben aber tatsächlich eine `UserIn`-Instanz zurück.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 17.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/response-model.md
这是如何做到的?我们来看看。🤓 ### 类型注解与工具链 { #type-annotations-and-tooling } 先看看编辑器、mypy 和其他工具会如何看待它。 `BaseUser` 有基础字段。然后 `UserIn` 继承自 `BaseUser` 并新增了 `password` 字段,因此它包含了两个模型的全部字段。 我们把函数返回类型注解为 `BaseUser`,但实际上返回的是一个 `UserIn` 实例。 编辑器、mypy 和其他工具不会对此抱怨,因为在类型系统里,`UserIn` 是 `BaseUser` 的子类,这意味着当期望 `BaseUser` 时,返回 `UserIn` 是*合法*的。 ### FastAPI 的数据过滤 { #fastapi-data-filtering } 对于 FastAPI,它会查看返回类型并确保你返回的内容**只**包含该类型中声明的字段。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 14.5K bytes - Click Count (0) -
docs/es/docs/tutorial/extra-models.md
#### `.model_dump()` de Pydantic { #pydantics-model-dump } `user_in` es un modelo Pydantic de la clase `UserIn`. Los modelos Pydantic tienen un método `.model_dump()` que devuelve un `dict` con los datos del modelo. Así que, si creamos un objeto Pydantic `user_in` como: ```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` y luego llamamos a: ```Python
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)