Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 26 of 26 for 1154 (0.12 sec)

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

    ```
    
    ## セット型
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    そのため、以下のように、`Set`をインポートして`str`の`set`として`tags`を宣言することができます:
    
    ```Python hl_lines="1 14"
    {!../../../docs_src/body_nested_models/tutorial003.py!}
    ```
    
    これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。
    
    そして、そのデータを出力すると、たとえソースに重複があったとしても、固有の項目のセットとして出力されます。
    
    また、それに応じて注釈をつけたり、文書化したりします。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/body-nested-models.md

        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="1  14"
        {!> ../../../docs_src/body_nested_models/tutorial003.py!}
        ```
    
    这样,即使你收到带有重复数据的请求,这些数据也会被转换为一组唯一项。
    
    而且,每当你输出该数据时,即使源数据有重复,它们也将作为一组唯一项输出。
    
    并且还会被相应地标注 / 记录文档。
    
    ## 嵌套模型
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/body-nested-models.md

        ```
    
    ## ⚒ 🆎
    
    ✋️ ⤴️ 👥 💭 🔃 ⚫️, & 🤔 👈 🔖 🚫🔜 🚫 🔁, 👫 🔜 🎲 😍 🎻.
    
    & 🐍 ✔️ 🎁 💽 🆎 ⚒ 😍 🏬, `set`.
    
    ⤴️ 👥 💪 📣 `tags` ⚒ 🎻:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="1  14"
        {!> ../../../docs_src/body_nested_models/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ & 🔛"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/sql-databases.md

    Create utility functions to:
    
    * Read a single user by ID and by email.
    * Read multiple users.
    * Read multiple items.
    
    ```Python hl_lines="1  3  6-7  10-11  14-15  27-28"
    {!../../../docs_src/sql_databases/sql_app/crud.py!}
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/sql-databases.md

    🗄 `models` (🇸🇲 🏷) & `schemas` (Pydantic *🏷* / 🔗).
    
    ✍ 🚙 🔢:
    
    * ✍ 👁 👩‍💻 🆔 & 📧.
    * ✍ 💗 👩‍💻.
    * ✍ 💗 🏬.
    
    ```Python hl_lines="1  3  6-7  10-11  14-15  27-28"
    {!../../../docs_src/sql_databases/sql_app/crud.py!}
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  6. docs/zh/docs/tutorial/sql-databases.md

    导入之前的`models`(SQLAlchemy 模型)和`schemas`(Pydantic*模型*/模式)。
    
    创建一些实用函数来完成:
    
    * 通过 ID 和电子邮件查询单个用户。
    * 查询多个用户。
    * 查询多个项目。
    
    ```Python hl_lines="1  3  6-7  10-11  14-15  27-28"
    {!../../../docs_src/sql_databases/sql_app/crud.py!}
    ```
    
    !!! tip
        通过创建仅专用于与数据库交互(获取用户或项目)的函数,独立于*路径操作函数*,您可以更轻松地在多个部分中重用它们,并为它们添加单元测试。
    
    ### 创建数据
    
    现在创建实用程序函数来创建数据。
    
    它的步骤是:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
Back to top