Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 396 for Pydantic (0.17 sec)

  1. tests/test_filter_pydantic_sub_model_pv2.py

    from fastapi.exceptions import ResponseValidationError
    from fastapi.testclient import TestClient
    
    from .utils import needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from pydantic import BaseModel, ValidationInfo, field_validator
    
        app = FastAPI()
    
        class ModelB(BaseModel):
            username: str
    
        class ModelC(ModelB):
            password: str
    
        class ModelA(BaseModel):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. docs/de/docs/features.md

    * 100 % Testabdeckung.
    * 100 % Typen annotierte Codebasis.
    
    ## Pydantic's Merkmale
    
    **FastAPI** ist vollkommen kompatibel (und basiert auf) <a href="https://docs.pydantic.dev/" class="external-link" target="_blank"><strong>Pydantic</strong></a>. Das bedeutet, wenn Sie eigenen Pydantic Quellcode haben, funktioniert der.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 19:43:43 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_response/test_tutorial006c.py

            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/pydantic": {
                    "get": {
                        "summary": "Redirect Pydantic",
                        "operationId": "redirect_pydantic_pydantic_get",
                        "responses": {"302": {"description": "Successful Response"}},
                    }
                }
            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 899 bytes
    - Viewed (0)
  4. docs/en/docs/advanced/dataclasses.md

    So, even with the code above that doesn't use Pydantic explicitly, FastAPI is using Pydantic to convert those standard dataclasses to Pydantic's own flavor of dataclasses.
    
    And of course, it supports the same:
    
    * data validation
    * data serialization
    * data documentation, etc.
    
    This works the same way as with Pydantic models. And it is actually achieved in the same way underneath, using Pydantic.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/dataclasses.md

    Auch wenn im obige Code Pydantic nicht explizit vorkommt, verwendet FastAPI Pydantic, um diese Standard-Datenklassen in Pydantics eigene Variante von Datenklassen zu konvertieren.
    
    Und natürlich wird das gleiche unterstützt:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:23 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. .github/workflows/test.yml

          - name: Install Dependencies
            if: steps.cache.outputs.cache-hit != 'true'
            run: pip install -r requirements-tests.txt
          - name: Install Pydantic v1
            if: matrix.pydantic-version == 'pydantic-v1'
            run: pip install "pydantic>=1.10.0,<2.0.0"
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.4K bytes
    - Viewed (2)
  7. docs/zh/docs/advanced/dataclasses.md

    因此,即便上述代码没有显式使用 Pydantic,FastAPI 仍会使用 Pydantic 把标准数据类转换为 Pydantic 数据类(`dataclasses`)。
    
    并且,它仍然支持以下功能:
    
    * 数据验证
    * 数据序列化
    * 数据存档等
    
    数据类的和运作方式与 Pydantic 模型相同。实际上,它的底层使用的也是 Pydantic。
    
    !!! info "说明"
    
        注意,数据类不支持 Pydantic 模型的所有功能。
    
        因此,开发时仍需要使用 Pydantic 模型。
    
        但如果数据类很多,这一技巧能给 FastAPI 开发 Web API 增添不少助力。🤓
    
    ## `response_model` 使用数据类
    
    在 `response_model` 参数中使用 `dataclasses`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:44:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/response-model.md

        "name": "Foo",
        "price": 50.2
    }
    ```
    
    !!! info
        In Pydantic v1 hieß diese Methode `.dict()`, in Pydantic v2 wurde sie deprecated (aber immer noch unterstützt) und in `.model_dump()` umbenannt.
    
        Die Beispiele hier verwenden `.dict()` für die Kompatibilität mit Pydantic v1, Sie sollten jedoch stattdessen `.model_dump()` verwenden, wenn Sie Pydantic v2 verwenden können.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  9. 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 >=0.0.2",
        # # For the test client
        "httpx >=0.23.0",
        # For templates
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/dataclasses.md

    , ⏮️ 📟 🔛 👈 🚫 ⚙️ Pydantic 🎯, FastAPI ⚙️ Pydantic 🗜 📚 🐩 🎻 Pydantic 👍 🍛 🎻.
    
    &amp; ↗️, ⚫️ 🐕‍🦺 🎏:
    
    * 💽 🔬
    * 💽 🛠️
    * 💽 🧾, ♒️.
    
    👉 👷 🎏 🌌 ⏮️ Pydantic 🏷. &amp; ⚫️ 🤙 🏆 🎏 🌌 🔘, ⚙️ Pydantic.
    
    !!! info
        ✔️ 🤯 👈 🎻 💪 🚫 🌐 Pydantic 🏷 💪.
    
        , 👆 5️⃣📆 💪 ⚙️ Pydantic 🏷.
    
        ✋️ 🚥 👆 ✔️ 📚 🎻 🤥 🤭, 👉 👌 🎱 ⚙️ 👫 🏋️ 🕸 🛠️ ⚙️ FastAPI. 👶
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top