Search Options

Results per page
Sort
Preferred Languages
Advance

Results 301 - 310 of 713 for Pydantic (0.27 sec)

  1. docs/tr/docs/python-types.md

    {* ../../docs_src/python_types/tutorial010.py hl[6] *}
    
    
    Ve yine bütün editör desteğini alırsınız:
    
    <img src="/img/python-types/image06.png">
    
    ## Pydantic modelleri
    
    <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> veri doğrulaması yapmak için bir Python kütüphanesidir.
    
    Verilerin "biçimini" niteliklere sahip sınıflar olarak düzenlersiniz.
    
    Ve her niteliğin bir türü vardır.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. docs_src/response_model/tutorial006_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 848 bytes
    - Viewed (0)
  3. docs_src/path_operation_configuration/tutorial005_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        response_description="The created item",
    )
    async def create_item(item: Item):
        """
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 698 bytes
    - Viewed (0)
  4. docs_src/body_fields/tutorial001_an_py310.py

    from typing import Annotated
    
    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}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 563 bytes
    - Viewed (0)
  5. docs_src/body_multiple_params/tutorial004_an_py310.py

    from typing import Annotated
    
    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,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 643 bytes
    - Viewed (0)
  6. tests/test_validate_response_recursive/app.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class RecursiveItem(BaseModel):
        sub_items: list["RecursiveItem"] = []
        name: str
    
    
    class RecursiveSubitemInSubmodel(BaseModel):
        sub_items2: list["RecursiveItemViaSubmodel"] = []
        name: str
    
    
    class RecursiveItemViaSubmodel(BaseModel):
        sub_items1: list[RecursiveSubitemInSubmodel] = []
        name: str
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  7. docs/uk/docs/python-types.md

    {* ../../docs_src/python_types/tutorial010.py hl[6] *}
    
    
    І знову ж таки, ви отримуєте всю підтримку редактора:
    
    <img src="/img/python-types/image06.png">
    
    ## Pydantic моделі
    
    <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> це бібліотека Python для валідації даних.
    
    Ви оголошуєте «форму» даних як класи з атрибутами.
    
    І кожен атрибут має тип.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  8. docs/zh/docs/python-types.md

    <img src="https://fastapi.tiangolo.com/img/python-types/image06.png">
    
    ## Pydantic 模型
    
    <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> 是一个用来执行数据校验的 Python 库。
    
    你可以将数据的"结构"声明为具有属性的类。
    
    每个属性都拥有类型。
    
    接着你用一些值来创建这个类的实例,这些值会被校验,并被转换为适当的类型(在需要的情况下),返回一个包含所有数据的对象。
    
    然后,你将获得这个对象的所有编辑器支持。
    
    下面的例子来自 Pydantic 官方文档:
    
    //// tab | Python 3.10+
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Aug 18 06:34:40 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  9. docs/ko/docs/how-to/conditional-openapi.md

    API를 보호하고 싶다면, 예를 들어 다음과 같은 더 나은 방법들이 있습니다:
    
    * 요청 본문과 응답에 대해 잘 정의된 Pydantic 모델을 사용하도록 하세요.
    
    * 종속성을 사용하여 필요한 권한과 역할을 구성하세요.
    
    * 평문 비밀번호를 절대 저장하지 말고, 오직 암호화된 비밀번호만 저장하세요.
    
    * Passlib과 JWT 토큰과 같은 잘 알려진 암호화 도구들을 구현하고 사용하세요.
    
    * 필요한 곳에 OAuth2 범위를 사용하여 더 세분화된 권한 제어를 추가하세요.
    
    * 등등....
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Nov 07 20:41:38 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/response-directly.md

    # Return a Response Directly { #return-a-response-directly }
    
    When you create a **FastAPI** *path operation* you can normally return any data from it: a `dict`, a `list`, a Pydantic model, a database model, etc.
    
    By default, **FastAPI** would automatically convert that return value to JSON using the `jsonable_encoder` explained in [JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.1K bytes
    - Viewed (0)
Back to top