Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1061 - 1070 of 1,184 for asdict (0.07 sec)

  1. docs/fr/docs/tutorial/first-steps.md

    ///
    
    ### Étape 5 : retourner le contenu
    
    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Vous pouvez retourner un dictionnaire (`dict`), une liste (`list`), des valeurs seules comme des chaines de caractères (`str`) et des entiers (`int`), etc.
    
    Vous pouvez aussi retourner des models **Pydantic** (qui seront détaillés plus tard).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/security/get-current-user.md

    そして、セキュリティ要件のためにどんなモデルやデータでも利用することができます。(この場合は、 Pydanticモデルの `User`)
    
    しかし、特定のデータモデルやクラス、型に制限されることはありません。
    
    モデルを、 `id` と `email` は持つが、 `username` は全く持たないようにしたいですか? わかりました。同じ手段でこうしたこともできます。
    
    ある `str` だけを持ちたい? あるいはある `dict` だけですか? それとも、データベースクラスのモデルインスタンスを直接持ちたいですか? すべて同じやり方で機能します。
    
    実際には、あなたのアプリケーションにはログインするようなユーザーはおらず、単にアクセストークンを持つロボットやボット、別のシステムがありますか?ここでも、全く同じようにすべて機能します。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/first-steps.md

    ///
    
    ### Passo 5: retorne o conteúdo
    
    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Você pode retornar um `dict`, `list` e valores singulares como `str`, `int`, etc.
    
    Você também pode devolver modelos Pydantic (você verá mais sobre isso mais tarde).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/handling-errors.md

      "detail": "Item not found"
    }
    ```
    
    /// tip | "Dica"
    
    Quando você lançar um `HTTPException`, você pode passar qualquer valor convertível em JSON como parâmetro de `detail`, e não apenas `str`.
    
    Você pode passar um `dict` ou um `list`, etc.
    Esses tipos de dados são manipulados automaticamente pelo **FastAPI** e convertidos em JSON.
    
    ///
    
    ## Adicione headers customizados
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/handling-errors.md

    ```JSON
    {
      "detail": "Item not found"
    }
    
    ```
    
    /// tip | "提示"
    
    触发 `HTTPException` 时,可以用参数 `detail` 传递任何能转换为 JSON 的值,不仅限于 `str`。
    
    还支持传递 `dict`、`list` 等数据结构。
    
    **FastAPI** 能自动处理这些数据,并将之转换为 JSON。
    
    ///
    
    ## 添加自定义响应头
    
    有些场景下要为 HTTP 错误添加自定义响应头。例如,出于某些方面的安全需要。
    
    一般情况下可能不会需要在代码中直接使用响应头。
    
    但对于某些高级应用场景,还是需要添加自定义响应头:
    
    ```Python hl_lines="14"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/path-params.md

    	Você também poderia acessar o valor `"lenet"` com `ModelName.lenet.value`
    
    #### Retorne *membros de enumeration*
    
    Você pode retornar *membros de enum* da sua *rota de operação*, em um corpo JSON aninhado (por exemplo um `dict`).
    
    Eles serão convertidos para o seus valores correspondentes (strings nesse caso) antes de serem retornados ao cliente:
    
    ```Python hl_lines="18  21  23"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        return method.getReturnType() == boolean.class;
      }
    
      /** Determines whether the given method can throw InterruptedException. */
      private static boolean isInterruptible(Method method) {
        return Arrays.asList(method.getExceptionTypes()).contains(InterruptedException.class);
      }
    
      /** Sorts the given methods primarily by name and secondarily by number of parameters. */
      private static void sortMethods(Method[] methods) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  8. architecture/ambient/ztunnel.md

    This resource aims to represent the relatively small set of Authorization policies that Ztunnel support.
    Most notably, this is only L4 resources.
    
    Most of the API is fairly straight forward.
    However, one interesting aspect is how these policies associate with workloads.
    Istio's AuthorizationPolicy has label selectors.
    However, we intentionally do not send those as part of the Workload API, in order to keep the size low.
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jul 17 23:10:17 UTC 2024
    - 16.8K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/first-steps.md

    ///
    
    ### Schritt 5: den Inhalt zurückgeben
    
    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Sie können ein `dict`, eine `list`, einzelne Werte wie `str`, `int`, usw. zurückgeben.
    
    Sie können auch Pydantic-Modelle zurückgeben (dazu später mehr).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/custom-response.md

    ///
    
    ### `Response`
    
    👑 `Response` 🎓, 🌐 🎏 📨 😖 ⚪️➡️ ⚫️.
    
    👆 💪 📨 ⚫️ 🔗.
    
    ⚫️ 🚫 📄 🔢:
    
    * `content` - `str` ⚖️ `bytes`.
    * `status_code` - `int` 🇺🇸🔍 👔 📟.
    * `headers` - `dict` 🎻.
    * `media_type` - `str` 🤝 📻 🆎. 🤶 Ⓜ. `"text/html"`.
    
    FastAPI (🤙 💃) 🔜 🔁 🔌 🎚-📐 🎚. ⚫️ 🔜 🔌 🎚-🆎 🎚, ⚓️ 🔛 = & 🔁 = ✍ 🆎.
    
    ```Python hl_lines="1  18"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top