Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for tutorial001_py39 (0.08 sec)

  1. docs/en/docs/python-types.md

    As the type, put `list`.
    
    As the list is a type that contains some internal types, you put them in square brackets:
    
    ```Python hl_lines="1"
    {!> ../../docs_src/python_types/tutorial006_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    From `typing`, import `List` (with a capital `L`):
    
    ```Python hl_lines="1"
    {!> ../../docs_src/python_types/tutorial006.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:47:53 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body.md

    First, you need to import `BaseModel` from `pydantic`:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[2] *}
    
    ## Create your data model
    
    Then you declare your data model as a class that inherits from `BaseModel`.
    
    Use standard Python types for all the attributes:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:58:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/pt/docs/advanced/websockets.md

    Quando uma conexão WebSocket é fechada, o `await websocket.receive_text()` levantará uma exceção `WebSocketDisconnect`, que você pode então capturar e lidar como neste exemplo.
    
    {*../../docs_src/websockets/tutorial003_py39.py hl[79:81]*}
    
    Para testar:
    
    * Abrar o aplicativo com várias abas do navegador.
    * Escreva mensagens a partir delas.
    * Então feche uma das abas.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:20:59 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/encoder.md

    You can use `jsonable_encoder` for that.
    
    It receives an object, like a Pydantic model, and returns a JSON compatible version:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 23:31:16 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top