Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for James (0.12 sec)

  1. docs/en/docs/tutorial/body-nested-models.md

    ## Nested Models
    
    Each attribute of a Pydantic model has a type.
    
    But that type can itself be another Pydantic model.
    
    So, you can declare deeply nested JSON "objects" with specific attribute names, types and validations.
    
    All that, arbitrarily nested.
    
    ### Define a submodel
    
    For example, we can define an `Image` model:
    
    === "Python 3.10+"
    
        ```Python hl_lines="7-9"
    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