Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 380 for Model3 (0.19 sec)

  1. tests/test_filter_pydantic_sub_model_pv2.py

                return name
    
        async def get_model_c() -> ModelC:
            return ModelC(username="test-user", password="test-password")
    
        @app.get("/model/{name}", response_model=ModelA)
        async def get_model_a(name: str, model_c=Depends(get_model_c)):
            return {"name": name, "description": "model-a-desc", "foo": model_c}
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    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/pt/docs/tutorial/body-nested-models.md

    ## Modelos aninhados
    
    Cada atributo de um modelo Pydantic tem um tipo.
    
    Mas esse tipo pode ser outro modelo Pydantic.
    
    Portanto, você pode declarar "objects" JSON profundamente aninhados com nomes, tipos e validações de atributos específicos.
    
    Tudo isso, aninhado arbitrariamente.
    
    ### Defina um sub-modelo
    
    Por exemplo, nós podemos definir um modelo `Image`:
    
    ```Python hl_lines="9-11"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/extra-models.md

    Das ist nützlich, wenn Sie die gültigen Feld-/Attribut-Namen von vorneherein nicht wissen (was für ein Pydantic-Modell notwendig ist).
    
    In diesem Fall können Sie `typing.Dict` verwenden (oder nur `dict` in Python 3.9 und darüber):
    
    === "Python 3.9+"
    
        ```Python hl_lines="6"
        {!> ../../../docs_src/extra_models/tutorial005_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/extra-models.md

    # Modelos Adicionais
    
    Continuando com o exemplo anterior, será comum ter mais de um modelo relacionado.
    
    Isso é especialmente o caso para modelos de usuários, porque:
    
    * O **modelo de entrada** precisa ser capaz de ter uma senha.
    * O **modelo de saída** não deve ter uma senha.
    * O **modelo de banco de dados** provavelmente precisaria ter uma senha criptografada.
    
    !!! danger
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/response-model.md

    `response_model` nimmt denselben Typ entgegen, den Sie auch für ein Pydantic-Modellfeld deklarieren würden, also etwa ein Pydantic-Modell, aber es kann auch z. B. eine `list`e von Pydantic-Modellen sein, wie etwa `List[Item]`.
    
    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)
  6. docs/en/docs/tutorial/extra-models.md

    # Extra Models
    
    Continuing with the previous example, it will be common to have more than one related model.
    
    This is especially the case for user models, because:
    
    * The **input model** needs to be able to have a password.
    * The **output model** should not have a password.
    * The **database model** would probably need to have a hashed password.
    
    !!! danger
        Never store user's plaintext passwords. Always store a "secure hash" that you can then verify.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  7. docs/ru/docs/tutorial/extra-models.md

        {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="1  14-15  18-20  33"
        {!> ../../../docs_src/extra_models/tutorial003.py!}
        ```
    
    ### `Union` в Python 3.10
    
    В этом примере мы передаём `Union[PlaneItem, CarItem]` в качестве значения аргумента `response_model`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-model.md

    `response_model` receives the same type you would declare for a Pydantic model field, so, it can be a Pydantic model, but it can also be, e.g. a `list` of Pydantic models, like `List[Item]`.
    
    FastAPI will use this `response_model` to do all the data documentation, validation, etc. and also to **convert and filter the output data** to its type declaration.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/body-nested-models.md

    === "Python 3.10+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial002_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial002_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial002.py!}
        ```
    
    ## Set-Typen
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/body-nested-models.md

    ## Deeply nested models
    
    You can define arbitrarily deeply nested models:
    
    === "Python 3.10+"
    
        ```Python hl_lines="7  12  18  21  25"
        {!> ../../../docs_src/body_nested_models/tutorial007_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="9  14  20  23  27"
        {!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
        ```
    
    === "Python 3.8+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
Back to top