- Sort Score
- Result 10 results
- Languages All
Results 301 - 310 of 346 for BaseModel (0.04 sec)
-
docs/ko/docs/tutorial/body.md
`GET` 요청에 본문을 담는 것은 권장되지 않기에, Swagger UI같은 대화형 문서에서는 `GET` 사용시 담기는 본문에 대한 문서를 표시하지 않으며, 중간에 있는 프록시는 이를 지원하지 않을 수도 있습니다. /// ## Pydantic의 `BaseModel` 임포트 먼저 `pydantic`에서 `BaseModel`를 임포트해야 합니다: {* ../../docs_src/body/tutorial001_py310.py hl[2] *} ## 여러분의 데이터 모델 만들기 `BaseModel`를 상속받은 클래스로 여러분의 데이터 모델을 선언합니다. 모든 어트리뷰트에 대해 표준 파이썬 타입을 사용합니다: {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7.8K bytes - Viewed (0) -
tests/test_security_oauth2.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } }, description="OAuth2 security scheme", auto_error=False, ) class User(BaseModel): username: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.1K bytes - Viewed (0) -
docs/uk/docs/features.md
Ось приклад стандартного Python-коду з типами: ```Python from datetime import date from pydantic import BaseModel # Оголошення змінної як str # з підтримкою автодоповнення у редакторі def main(user_id: str): return user_id # Модель Pydantic class User(BaseModel): id: int name: str joined: date ``` Приклад використання цієї моделі: ```Python
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 14.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 Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Jul 26 10:48:11 UTC 2025 - 7.8K bytes - Viewed (0) -
tests/test_openapi_examples.py
from typing import Union from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={ "Example One": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.1K bytes - Viewed (0) -
tests/test_extra_routes.py
from typing import Optional from fastapi import FastAPI from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None @app.api_route("/items/{item_id}", methods=["GET"]) def get_items(item_id: str): return {"item_id": item_id} def get_not_decorated(item_id: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.exceptions import FastAPIDeprecationWarning from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict def create_app(): app = FastAPI() class Item(BaseModel): data: str model_config = ConfigDict( json_schema_extra={"example": {"data": "Data in schema_extra"}} )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 32.2K 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 Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (0) -
docs/ru/docs/features.md
Вы пишете стандартный Python с типами: ```Python from datetime import date from pydantic import BaseModel # Объявляем параметр как `str` # и получаем поддержку редактора кода внутри функции def main(user_id: str): return user_id # Модель Pydantic class User(BaseModel): id: int name: str joined: date ``` Это можно использовать так: ```Python
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 16K bytes - Viewed (0)