Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 191 for tutorial001_py39 (0.13 sec)

  1. 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)
  2. docs/em/docs/tutorial/encoder.md

    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```Python hl_lines="4  21"
    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    👉 🖼, ⚫️ 🔜 🗜 Pydantic 🏷 `dict`, & `datetime` `str`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/body.md

    ///
    
    ## Pydantic의 `BaseModel` 임포트
    
    먼저 `pydantic`에서 `BaseModel`를 임포트해야 합니다:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="2"
    {!> ../../docs_src/body/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body/tutorial001.py!}
    ```
    
    ////
    
    ## 여러분의 데이터 모델 만들기
    
    `BaseModel`를 상속받은 클래스로 여러분의 데이터 모델을 선언합니다.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/dependencies/index.md

    ```Python hl_lines="8-11"
    {!> ../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```Python hl_lines="6-7"
    {!> ../../docs_src/dependencies/tutorial001_py310.py!}
    ```
    
    ////
    
    👈 ⚫️.
    
    **2️⃣ ⏸**.
    
    & ⚫️ ✔️ 🎏 💠 & 📊 👈 🌐 👆 *➡ 🛠️ 🔢* ✔️.
    
    👆 💪 💭 ⚫️ *➡ 🛠️ 🔢* 🍵 "👨‍🎨" (🍵 `@app.get("/some-path")`).
    
    & ⚫️ 💪 📨 🕳 👆 💚.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. docs/uk/docs/tutorial/body.md

    //// tab | Python 3.8 і вище
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body/tutorial001.py!}
    ```
    
    ////
    
    //// tab | Python 3.10 і вище
    
    ```Python hl_lines="2"
    {!> ../../docs_src/body/tutorial001_py310.py!}
    ```
    
    ////
    
    ## Створіть свою модель даних
    
    Потім ви оголошуєте свою модель даних як клас, який успадковується від `BaseModel`.
    
    Використовуйте стандартні типи Python для всіх атрибутів:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  6. 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)
  7. docs/pt/docs/tutorial/encoder.md

    A função recebe um objeto, como um modelo Pydantic e retorna uma versão compatível com JSON:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="4  21"
    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/websockets.md

    ## 处理断开连接和多个客户端
    
    当 WebSocket 连接关闭时,`await websocket.receive_text()` 将引发 `WebSocketDisconnect` 异常,您可以捕获并处理该异常,就像本示例中的示例一样。
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="79-81"
    {!> ../../docs_src/websockets/tutorial003_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="81-83"
    {!> ../../docs_src/websockets/tutorial003.py!}
    ```
    
    ////
    
    尝试以下操作:
    
    * 使用多个浏览器选项卡打开应用程序。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/encoder.md

    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    对此你可以使用`jsonable_encoder`。
    
    它接收一个对象,比如Pydantic模型,并会返回一个JSON兼容的版本:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="4  21"
    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    在这个例子中,它将Pydantic模型转换为`dict`,并将`datetime`转换为`str`。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/websockets.md

    //// tab | Python 3.9+
    
    ```Python hl_lines="79-81"
    {!> ../../docs_src/websockets/tutorial003_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="81-83"
    {!> ../../docs_src/websockets/tutorial003.py!}
    ```
    
    ////
    
    Zum Ausprobieren:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top