- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for FieldInfo (0.22 sec)
-
fastapi/_compat.py
def is_bytes_sequence_field(field: ModelField) -> bool: return is_bytes_sequence_annotation(field.type_) def copy_field_info(*, field_info: FieldInfo, annotation: Any) -> FieldInfo: cls = type(field_info) merged_field_info = cls.from_annotation(annotation) new_field_info = copy(field_info) new_field_info.metadata = merged_field_info.metadata
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
docs/em/docs/tutorial/body-fields.md
//// `Field` 👷 🎏 🌌 `Query`, `Path` & `Body`, ⚫️ ✔️ 🌐 🎏 🔢, ♒️. /// note | "📡 ℹ" 🤙, `Query`, `Path` & 🎏 👆 🔜 👀 ⏭ ✍ 🎚 🏿 ⚠ `Param` 🎓, ❔ ⚫️ 🏿 Pydantic `FieldInfo` 🎓. & Pydantic `Field` 📨 👐 `FieldInfo` 👍. `Body` 📨 🎚 🏿 `FieldInfo` 🔗. & 📤 🎏 👆 🔜 👀 ⏪ 👈 🏿 `Body` 🎓. 💭 👈 🕐❔ 👆 🗄 `Query`, `Path`, & 🎏 ⚪️➡️ `fastapi`, 👈 🤙 🔢 👈 📨 🎁 🎓. /// /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-fields.md
Actually, `Query`, `Path` and others you'll see next create objects of subclasses of a common `Param` class, which is itself a subclass of Pydantic's `FieldInfo` class. And Pydantic's `Field` returns an instance of `FieldInfo` as well. `Body` also returns objects of a subclass of `FieldInfo` directly. And there are others you will see later that are subclasses of the `Body` class.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:01:18 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-fields.md
Na realidade, `Query`, `Path` e outros que você verá em seguida, criam objetos de subclasses de uma classe `Param` comum, que é ela mesma uma subclasse da classe `FieldInfo` do Pydantic. E `Field` do Pydantic retorna uma instância de `FieldInfo` também. `Body` também retorna objetos de uma subclasse de `FieldInfo` diretamente. E tem outras que você verá mais tarde que são subclasses da classe `Body`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-fields.md
На самом деле, `Query`, `Path` и другие функции, которые вы увидите в дальнейшем, создают объекты подклассов общего класса `Param`, который сам по себе является подклассом `FieldInfo` из Pydantic. И `Field` (из Pydantic), и `Body`, оба возвращают объекты подкласса `FieldInfo`. У класса `Body` есть и другие подклассы, с которыми вы ознакомитесь позже.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_compat.py
) from fastapi.testclient import TestClient from pydantic import BaseConfig, BaseModel, ConfigDict from pydantic.fields import FieldInfo from .utils import needs_pydanticv1, needs_pydanticv2 @needs_pydanticv2 def test_model_field_default_required(): # For coverage field_info = FieldInfo(annotation=str) field = ModelField(name="foo", field_info=field_info) assert field.default is Undefined
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Sep 11 07:45:30 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/body-fields.md
``` //// `Field` 的工作方式和 `Query`、`Path`、`Body` 相同,参数也相同。 /// note | "技术细节" 实际上,`Query`、`Path` 都是 `Params` 的子类,而 `Params` 类又是 Pydantic 中 `FieldInfo` 的子类。 Pydantic 的 `Field` 返回也是 `FieldInfo` 的类实例。 `Body` 直接返回的也是 `FieldInfo` 的子类的对象。后文还会介绍一些 `Body` 的子类。 注意,从 `fastapi` 导入的 `Query`、`Path` 等对象实际上都是返回特殊类的函数。 /// /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/uk/docs/tutorial/body-fields.md
Насправді, `Query`, `Path` та інші, що ви побачите далі, створюють об'єкти підкласів загального класу `Param`, котрий сам є підкласом класу `FieldInfo` з Pydantic. І `Field` від Pydantic також повертає екземпляр `FieldInfo`. `Body` також безпосередньо повертає об'єкти підкласу `FieldInfo`. І є інші підкласи, які ви побачите пізніше, що є підкласами класу Body.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/de/docs/tutorial/body-fields.md
Und Pydantics `Field` gibt ebenfalls eine Instanz von `FieldInfo` zurück. `Body` gibt auch Instanzen einer Unterklasse von `FieldInfo` zurück. Und später werden Sie andere sehen, die Unterklassen der `Body`-Klasse sind.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.9K bytes - Viewed (0) -
fastapi/utils.py
model_config: Type[BaseConfig] = BaseConfig, field_info: Optional[FieldInfo] = None, alias: Optional[str] = None, mode: Literal["validation", "serialization"] = "validation", ) -> ModelField: class_validators = class_validators or {} if PYDANTIC_V2: field_info = field_info or FieldInfo( annotation=type_, default=default, alias=alias ) else:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 23:46:03 UTC 2024 - 7.8K bytes - Viewed (0)