Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 849 for Pydantic (0.06 sec)

  1. tests/test_tutorial/test_dataclasses/test_tutorial001.py

                        "input": "invalid price",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["body", "price"],
                        "msg": "value is not a valid float",
                        "type": "type_error.float",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. tests/test_union_inherited_body.py

    from typing import Optional, Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class ExtendedItem(Item):
        age: int
    
    
    @app.post("/items/")
    def save_union_different_body(item: Union[ExtendedItem, Item]):
        return {"item": item}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  3. docs/pt/docs/advanced/additional-responses.md

    Cada um desses `dict` de retorno pode ter uma chave `model`, contendo um modelo do Pydantic, assim como o `response_model`.
    
    O **FastAPI** pegará este modelo, gerará o esquema JSON dele e incluirá no local correto do OpenAPI.
    
    Por exemplo, para declarar um outro retorno com o status code `404` e um modelo do Pydantic chamado `Message`, você pode escrever:
    
    ```Python hl_lines="18  22"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  4. docs/em/docs/features.md

    * **⚜**, 🗜, 🎻 📁, 🎏 📨.
    * **🎉 & 🍪** 🐕‍🦺.
    * 1️⃣0️⃣0️⃣ 💯 💯 💰.
    * 1️⃣0️⃣0️⃣ 💯 🆎 ✍ ✍.
    
    ## Pydantic ⚒
    
    **FastAPI** 🍕 🔗 ⏮️ (&amp; ⚓️ 🔛) <a href="https://docs.pydantic.dev/" class="external-link" target="_blank"><strong>Pydantic</strong></a>. , 🙆 🌖 Pydantic 📟 👆 ✔️, 🔜 👷.
    
    ✅ 🔢 🗃 ⚓️ 🔛 Pydantic, <abbr title="Object-Relational Mapper">🐜</abbr>Ⓜ, <abbr title="Object-Document Mapper">🏭</abbr>Ⓜ 💽.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/extra-data-types.md

        * 生成されたスキーマは`str`で`binary`の「フォーマット」持つことを指定します。
    * `Decimal`:
        * Pythonの標準的な`Decimal`です。
        * リクエストやレスポンスでは`float`と同じように扱います。
    
    * Pydanticの全ての有効な型はこちらで確認できます: <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Pydantic data types</a>。
    ## 例
    
    ここでは、上記の型のいくつかを使用したパラメータを持つ*path operation*の例を示します。
    
    ```Python hl_lines="1 2 12-16"
    {!../../docs_src/extra_data_types/tutorial001.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

                                            ],
                                        }
                                    )
                                    | IsDict(
                                        # TODO: remove when deprecating Pydantic v1
                                        {
                                            "allOf": [
                                                {"$ref": "#/components/schemas/Item"}
                                            ],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  7. pyproject.toml

        "email-validator >=2.0.0",
        # Uvicorn with uvloop
        "uvicorn[standard] >=0.12.0",
        # TODO: this should be part of some pydantic optional extra dependencies
        # # Settings management
        # "pydantic-settings >=2.0.0",
        # # Extra Pydantic data types
        # "pydantic-extra-types >=2.0.0",
    ]
    
    all = [
        "fastapi-cli[standard] >=0.0.5",
        # # For the test client
        "httpx >=0.23.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 14:19:56 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an.py

        return client
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. docs/ko/docs/deployment/versions.md

    서로다른 버전의 **FastAPI**가 구체적이고 새로운 버전의 Starlette을 사용할 것입니다.
    
    그러므로 **FastAPI**가 알맞은 Starlette 버전을 사용하도록 하십시오.
    
    ## Pydantic에 대해
    
    Pydantic은 **FastAPI** 를 위한 검사를 포함하고 있습니다. 따라서, 새로운 버전의 Pydantic(`1.0.0`이상)은 항상 FastAPI와 호환됩니다.
    
    작업을 하고 있는 `1.0.0` 이상의 모든 버전과 `2.0.0` 이하의 Pydantic 버전을 표시할 수 있습니다.
    
    예를 들어 다음과 같습니다:
    
    ```txt
    pydantic>=1.2.0,<2.0.0
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py39.py

                                        }
                                    )
                                    | IsDict(
                                        # TODO: remove when deprecating Pydantic v1
                                        {
                                            "$ref": "#/components/schemas/Body_read_items_items__item_id__put"
                                        }
                                    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Apr 19 00:11:40 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top