- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for BaseModel (0.05 sec)
-
docs/en/docs/tutorial/body.md
/// ## Import Pydantic's `BaseModel` { #import-pydantics-basemodel } First, you need to import `BaseModel` from `pydantic`: {* ../../docs_src/body/tutorial001_py310.py hl[2] *} ## Create your data model { #create-your-data-model } Then you declare your data model as a class that inherits from `BaseModel`. Use standard Python types for all the attributes:
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:58:56 UTC 2025 - 7.1K bytes - Viewed (0) -
schema/schema_test.go
} fields := []schema.Field{ {Name: "ID", DBName: "id", BindNames: []string{"VersionModel", "BaseModel", "ID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, HasDefaultValue: true, AutoIncrement: true}, {Name: "CreatedBy", DBName: "created_by", BindNames: []string{"VersionModel", "BaseModel", "CreatedBy"}, DataType: schema.Uint, Size: 64},
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/body.md
非推奨なので、Swagger UIを使った対話型のドキュメントにはGETのボディ情報は表示されません。さらに、中継するプロキシが対応していない可能性があります。 /// ## Pydanticの `BaseModel` をインポート ます初めに、 `pydantic` から `BaseModel` をインポートする必要があります: {* ../../docs_src/body/tutorial001.py hl[4] *} ## データモデルの作成 そして、`BaseModel` を継承したクラスとしてデータモデルを宣言します。 すべての属性にpython標準の型を使用します: {* ../../docs_src/body/tutorial001.py hl[7:11] *}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sat Jul 26 10:48:11 UTC 2025 - 7.8K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
{* ../../docs_src/dataclasses/tutorial001.py hl[1,7:12,19:20] *} This is still supported thanks to **Pydantic**, as it has <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">internal support for `dataclasses`</a>.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4.1K bytes - Viewed (0) -
docs/uk/docs/index.md
Оголошуйте вміст запиту за допомогою стандартних типів Python завдяки Pydantic. ```Python hl_lines="4 9-12 25-27" from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 24.2K bytes - Viewed (0) -
docs/en/docs/features.md
You write standard Python with types: ```Python from datetime import date from pydantic import BaseModel # Declare a variable as a str # and get editor support inside the function def main(user_id: str): return user_id # A Pydantic model class User(BaseModel): id: int name: str joined: date ``` That can then be used like: ```Python
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.5K bytes - Viewed (0) -
docs/pl/docs/index.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 19.6K bytes - Viewed (0) -
docs/vi/docs/index.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 21.9K bytes - Viewed (0) -
docs/de/docs/index.md
Deklarieren Sie den Body mithilfe von Standard-Python-Typen, dank Pydantic. ```Python hl_lines="4 9-12 25-27" from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 21.1K bytes - Viewed (0) -
docs/it/docs/index.md
Dichiara il _body_ usando le annotazioni di tipo standard di Python, grazie a Pydantic. ```Python hl_lines="2 7-10 23-25" from fastapi import FastAPI from pydantic import BaseModel from typing import Optional app = FastAPI() class Item(BaseModel): name: str price: float is_offer: bool = Optional[None] @app.get("/") def read_root(): return {"Hello": "World"}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 19.5K bytes - Viewed (0)