Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 501 - 510 of 713 for Pydantic (0.04 seconds)

  1. docs/ko/docs/tutorial/sql-databases.md

    `SQLModel`을 가져오고 데이터베이스 모델을 생성합니다:
    
    {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[1:11] hl[7:11] *}
    
    `Hero` 클래스는 Pydantic 모델과 매우 유사합니다 (실제로 내부적으로 *Pydantic 모델이기도 합니다*).
    
    몇 가지 차이점이 있습니다:
    
    * `table=True`는 SQLModel에 이 모델이 *테이블 모델*이며, 단순한 데이터 모델이 아니라 SQL 데이터베이스의 **테이블**을 나타낸다는 것을 알려줍니다. (다른 일반적인 Pydantic 클래스처럼) 단순한 *데이터 모델*이 아닙니다.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 24 16:14:29 GMT 2024
    - 18K bytes
    - Click Count (0)
  2. docs_src/body_fields/tutorial001_py310.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = Field(
            default=None, title="The description of the item", max_length=300
        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 523 bytes
    - Click Count (0)
  3. docs_src/response_model/tutorial001_py39.py

    from typing import Any, Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: list[str] = []
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item) -> Any:
        return item
    
    
    @app.get("/items/", response_model=list[Item])
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 556 bytes
    - Click Count (0)
  4. docs/es/docs/history-design-future.md

    ## Requisitos { #requirements }
    
    Después de probar varias alternativas, decidí que iba a usar <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> por sus ventajas.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 10:15:01 GMT 2025
    - 4.7K bytes
    - Click Count (0)
  5. docs/en/docs/history-design-future.md

    ## Requirements { #requirements }
    
    After testing several alternatives, I decided that I was going to use <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> for its advantages.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  6. docs/ru/docs/tutorial/body-multiple-params.md

    {* ../../docs_src/body_multiple_params/tutorial002_py310.py hl[20] *}
    
    В этом случае **FastAPI** заметит, что в функции есть более одного параметра тела (два параметра, которые являются Pydantic-моделями).
    
    Таким образом, имена параметров будут использоваться в качестве ключей (имён полей) в теле запроса, и будет ожидаться запрос следующего формата:
    
    ```JSON
    {
        "item": {
            "name": "Foo",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 30 11:24:39 GMT 2025
    - 8.3K bytes
    - Click Count (0)
  7. docs/pt/docs/history-design-future.md

    ## Requisitos { #requirements }
    
    Após testar várias alternativas, eu decidi que usaria o <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> por suas vantagens.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Nov 12 16:23:57 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  8. tests/test_request_param_model_by_alias.py

    from dirty_equals import IsPartialDict
    from fastapi import Cookie, FastAPI, Header, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        param: str = Field(alias="param_alias")
    
    
    @app.get("/query")
    async def query_model(data: Model = Query()):
        return {"param": data.param}
    
    
    @app.get("/header")
    async def header_model(data: Model = Header()):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  9. tests/test_additional_responses_custom_model_in_callback.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    from pydantic import BaseModel, HttpUrl
    from starlette.responses import JSONResponse
    
    
    class CustomModel(BaseModel):
        a: int
    
    
    app = FastAPI()
    
    callback_router = APIRouter(default_response_class=JSONResponse)
    
    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 5.8K bytes
    - Click Count (0)
  10. docs_src/body_multiple_params/tutorial004_py310.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    class User(BaseModel):
        username: str
        full_name: str | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item,
        user: User,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Mar 10 18:49:18 GMT 2023
    - 603 bytes
    - Click Count (0)
Back to Top