Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 162 for custosa (0.1 sec)

  1. docs/pt/docs/advanced/events.md

    Nós criamos uma função assíncrona chamada `lifespan()` com `yield` como este:
    
    ```Python hl_lines="16  19"
    {!../../docs_src/events/tutorial003.py!}
    ```
    
    Aqui nós estamos simulando a *inicialização* custosa do carregamento do modelo colocando a (falsa) função de modelo no dicionário com modelos de _machine learning_ antes do `yield`. Este código será executado **antes** da aplicação **começar a receber requisições**, durante a *inicialização*.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. docs/pt/docs/advanced/settings.md

    ### Declarando `Settings` apenas uma vez com `lru_cache`
    
    Ler o conteúdo de um arquivo em disco normalmente é uma operação custosa (lenta), então você provavelmente quer fazer isso apenas um vez e reutilizar o mesmo objeto settings depois, em vez de ler os valores a cada requisição.
    
    Mas cada vez que fazemos:
    
    ```Python
    Settings()
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/custom-response.md

    In this case, you can return the file path directly from your *path operation* function.
    
    ## Custom response class
    
    You can create your own custom response class, inheriting from `Response` and using it.
    
    For example, let's say that you want to use <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, but with some custom settings not used in the included `ORJSONResponse` class.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  4. docs/pt/docs/advanced/custom-response.md

    Mas se você passasse uma `HTMLResponse` em `response_class` também, o **FastAPI** saberia como documentar isso no OpenAPI e na documentação interativa como um HTML com `text/html`:
    
    <img src="/img/tutorial/custom-response/image01.png">
    
    ## Respostas disponíveis
    
    Aqui estão algumas dos tipos de resposta disponíveis.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 11:47:10 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  5. docs/ja/docs/advanced/custom-response.md

    しかし、一方では `response_class` に `HTMLResponse` を渡しているため、 **FastAPI** はOpenAPIや対話的ドキュメントでHTMLとして `text/html` でドキュメント化する方法を知っています。
    
    <img src="/img/tutorial/custom-response/image01.png">
    
    ## 利用可能なレスポンス
    
    以下が利用可能なレスポンスの一部です。
    
    `Response` を使って他の何かを返せますし、カスタムのサブクラスも作れることを覚えておいてください。
    
    /// note | "技術詳細"
    
    `from starlette.responses import HTMLResponse` も利用できます。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  6. docs/en/docs/how-to/custom-request-and-route.md

    * Decompressing gzip-compressed request bodies.
    * Automatically logging all request bodies.
    
    ## Handling custom request body encodings
    
    Let's see how to make use of a custom `Request` subclass to decompress gzip requests.
    
    And an `APIRoute` subclass to use that custom request class.
    
    ### Create a custom `GzipRequest` class
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 22:39:38 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/custom-docs-ui-assets.md

    The same as when using a custom CDN, the first step is to disable the automatic docs, as those use the CDN by default.
    
    To disable them, set their URLs to `None` when creating your `FastAPI` app:
    
    {* ../../docs_src/custom_docs_ui/tutorial002.py hl[9] *}
    
    ### Include the custom docs for static files
    
    And the same way as with a custom CDN, now you can create the *path operations* for the custom docs.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:42:34 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/custom-response.md

    通过返回函数 `generate_html_response()` 的调用结果,你已经返回一个重载 **FastAPI** 默认行为的 `Response` 对象,
    
    但如果你在 `response_class` 中也传入了 `HTMLResponse`,**FastAPI** 会知道如何在 OpenAPI 和交互式文档中使用 `text/html` 将其文档化为 HTML。
    
    <img src="/img/tutorial/custom-response/image01.png">
    
    ## 可用响应
    
    这里有一些可用的响应。
    
    要记得你可以使用 `Response` 来返回任何其他东西,甚至创建一个自定义的子类。
    
    /// note | "技术细节"
    
    你也可以使用 `from starlette.responses import HTMLResponse`。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/custom-response.md

    🛬 🏁 🤙 `generate_html_response()`, 👆 ⏪ 🛬 `Response` 👈 🔜 🔐 🔢 **FastAPI** 🎭.
    
    ✋️ 👆 🚶‍♀️ `HTMLResponse` `response_class` 💁‍♂️, **FastAPI** 🔜 💭 ❔ 📄 ⚫️ 🗄 &amp; 🎓 🩺 🕸 ⏮️ `text/html`:
    
    <img src="/img/tutorial/custom-response/image01.png">
    
    ## 💪 📨
    
    📥 💪 📨.
    
    ✔️ 🤯 👈 👆 💪 ⚙️ `Response` 📨 🕳 🙆, ⚖️ ✍ 🛃 🎧-🎓.
    
    /// note | "📡 ℹ"
    
    👆 💪 ⚙️ `from starlette.responses import HTMLResponse`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/custom-response.md

    Aber da Sie die `HTMLResponse` auch in der `response_class` übergeben haben, weiß **FastAPI**, dass sie in OpenAPI und der interaktiven Dokumentation als HTML mit `text/html` zu dokumentieren ist:
    
    <img src="/img/tutorial/custom-response/image01.png">
    
    ## Verfügbare Responses
    
    Hier sind einige der verfügbaren Responses.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.5K bytes
    - Viewed (0)
Back to top