Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 785 for Pydantic (0.24 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  3. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  4. .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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  5. 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)
  6. docs/de/docs/tutorial/body-nested-models.md

    Um alle Optionen kennenzulernen, die Sie haben, schauen Sie sich <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Pydantics Typübersicht</a> an. Sie werden im nächsten Kapitel ein paar Beispiele kennenlernen.
    
    Da wir zum Beispiel im `Image`-Modell ein Feld `url` haben, können wir deklarieren, dass das eine Instanz von Pydantics `HttpUrl` sein soll, anstelle eines `str`:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/body-fields.md

    ## Importe `Field`
    
    Primeiro, você tem que importá-lo:
    
    ```Python hl_lines="4"
    {!../../../docs_src/body_fields/tutorial001.py!}
    ```
    
    !!! warning "Aviso"
        Note que `Field` é importado diretamente do `pydantic`, não do `fastapi` como todo o resto (`Query`, `Path`, `Body`, etc).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 02 15:00:11 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-model.md

    }
    ```
    
    !!! info
        In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`.
    
        The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2.
    
    !!! info
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  9. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 19:43:43 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  10. docs/vi/docs/features.md

    * 100% test coverage.
    * 100% type annotated codebase.
    
    ## Tính năng của Pydantic
    
    **FastAPI** tương thích đầy đủ với (và dựa trên) <a href="https://docs.pydantic.dev/" class="external-link" target="_blank"><strong>Pydantic</strong></a>. Do đó, bất kì code Pydantic nào bạn thêm vào cũng sẽ hoạt động.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top