Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1021 - 1030 of 1,977 for Fastapi (0.08 sec)

  1. docs/ja/docs/advanced/response-directly.md

    ```
    
    /// note | "技術詳細"
    
    また、`from starlette.responses import JSONResponse` も利用できます。
    
    **FastAPI** は開発者の利便性のために `fastapi.responses` という `starlette.responses` と同じものを提供しています。しかし、利用可能なレスポンスのほとんどはStarletteから直接提供されます。
    
    ///
    
    ## カスタム `Response` を返す
    
    上記の例では必要な部分を全て示していますが、あまり便利ではありません。`item` を直接返すことができるし、**FastAPI** はそれを `dict` に変換して `JSONResponse` に含めてくれるなど。すべて、デフォルトの動作です。
    
    では、これを使ってカスタムレスポンスをどう返すか見てみましょう。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/custom-response.md

    在这个例子中,HTTP 头的 `Content-Type` 会被设置成 `application/json`。
    
    并且在 OpenAPI 文档中也会这样记录。
    
    ///
    
    /// tip | "小贴士"
    
    `ORJSONResponse` 目前只在 FastAPI 中可用,而在 Starlette 中不可用。
    
    ///
    
    ## HTML 响应
    
    使用 `HTMLResponse` 来从 **FastAPI** 中直接返回一个 HTML 响应。
    
    * 导入 `HTMLResponse`。
    * 将 `HTMLResponse` 作为你的 *路径操作* 的 `response_class` 参数传入。
    
    ```Python hl_lines="2 7"
    {!../../docs_src/custom_response/tutorial002.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/request_files.md

    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | Detalhes técnicos do `async`
    
    Quando você utiliza métodos assíncronos, o **FastAPI** executa os métodos do arquivo em uma threadpool e espera por eles.
    
    ///
    
    /// note | Detalhes técnicos do Starlette
    
    O `UploadFile` do **FastAPI** herda diretamente do `UploadFile` do **Starlette**, mas adiciona algumas funcionalidades necessárias para ser compatível com o **Pydantic**
    
    ///
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/first-steps.md

    `FastAPI` is a class that inherits directly from `Starlette`.
    
    You can use all the <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> functionality with `FastAPI` too.
    
    ///
    
    ### Step 2: create a `FastAPI` "instance"
    
    {* ../../docs_src/first_steps/tutorial001.py hl[3] *}
    
    Here the `app` variable will be an "instance" of the class `FastAPI`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:48:16 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/path-params-numeric-validations.md

    ```
    
    ////
    
    /// info
    
    FastAPI added support for `Annotated` (and started recommending it) in version 0.95.0.
    
    If you have an older version, you would get errors when trying to use `Annotated`.
    
    Make sure you [Upgrade the FastAPI version](../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank} to at least 0.95.1 before using `Annotated`.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/security/simple-oauth2.md

    * 📦 `client_secret` (👥 🚫 💪 ⚫️ 👆 🖼).
    
    /// info
    
    `OAuth2PasswordRequestForm` 🚫 🎁 🎓 **FastAPI** `OAuth2PasswordBearer`.
    
    `OAuth2PasswordBearer` ⚒ **FastAPI** 💭 👈 ⚫️ 💂‍♂ ⚖. ⚫️ 🚮 👈 🌌 🗄.
    
    ✋️ `OAuth2PasswordRequestForm` 🎓 🔗 👈 👆 💪 ✔️ ✍ 👆, ⚖️ 👆 💪 ✔️ 📣 `Form` 🔢 🔗.
    
    ✋️ ⚫️ ⚠ ⚙️ 💼, ⚫️ 🚚 **FastAPI** 🔗, ⚒ ⚫️ ⏩.
    
    ///
    
    ### ⚙️ 📨 💽
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body.md

    /// note
    
    FastAPI will know that the value of `q` is not required because of the default value `= None`.
    
    The `str | None` (Python 3.10+) or `Union` in `Union[str, None]` (Python 3.8+) is not used by FastAPI to determine that the value is not required, it will know it's not required because it has a default value of `= None`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:58:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. docs/fr/docs/tutorial/body.md

    /// note
    
    **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `=None`.
    
    Le type `Optional` dans `Optional[str]` n'est pas utilisé par **FastAPI**, mais sera utile à votre éditeur pour améliorer le support offert par ce dernier et détecter plus facilement des erreurs de type.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 17:34:41 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. docs/en/docs/reference/templating.md

    You can use the `Jinja2Templates` class to render Jinja templates.
    
    Read more about it in the [FastAPI docs for Templates](https://fastapi.tiangolo.com/advanced/templates/).
    
    You can import it directly from `fastapi.templating`:
    
    ```python
    from fastapi.templating import Jinja2Templates
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 365 bytes
    - Viewed (0)
  10. docs/en/docs/external-links.md

    # External Links and Articles
    
    **FastAPI** has a great community constantly growing.
    
    There are many posts, articles, tools, and projects, related to **FastAPI**.
    
    Here's an incomplete list of some of them.
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 1K bytes
    - Viewed (0)
Back to top