Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for events (0.19 sec)

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

    ```
    
    Nesse caso, a função de manipulação de evento `startup` irá inicializar os itens do "banco de dados" (só um `dict`) com alguns valores.
    
    Você pode adicionar mais que uma função de manipulação de evento.
    
    E sua aplicação não irá começar a receber requisições até que todos os manipuladores de eventos de `startup` sejam concluídos.
    
    ### Evento `shutdown`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/events.md

    ```
    
    In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values.
    
    You can add more than one event handler function.
    
    And your application won't start receiving requests until all the `startup` event handlers have completed.
    
    ### `shutdown` event
    
    To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/events.md

    ```Python hl_lines="14-19"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    🥇 🍕 🔢, ⏭ `yield`, 🔜 🛠️ **⏭** 🈸 ▶️.
    
    & 🍕 ⏮️ `yield` 🔜 🛠️ **⏮️** 🈸 ✔️ 🏁.
    
    ### 🔁 🔑 👨‍💼
    
    🚥 👆 ✅, 🔢 🎀 ⏮️ `@asynccontextmanager`.
    
    👈 🗜 🔢 🔘 🕳 🤙 "**🔁 🔑 👨‍💼**".
    
    ```Python hl_lines="1  13"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/events.md

    使用 `startup` 事件声明 `app` 启动前运行的函数:
    
    ```Python hl_lines="8"
    {!../../../docs_src/events/tutorial001.py!}
    ```
    
    本例中,`startup` 事件处理器函数为项目数据库(只是**字典**)提供了一些初始值。
    
    **FastAPI** 支持多个事件处理器函数。
    
    只有所有 `startup` 事件处理器运行完毕,**FastAPI** 应用才开始接收请求。
    
    ## `shutdown` 事件
    
    使用 `shutdown` 事件声明 `app` 关闭时运行的函数:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. docs/vi/docs/features.md

    * Hỗ trợ **WebSocket**.
    * In-process background tasks.
    * Startup and shutdown events.
    * Client cho kiểm thử xây dựng trên HTTPX.
    * **CORS**, GZip, Static Files, Streaming responses.
    * Hỗ trợ **Session and Cookie**.
    * 100% test coverage.
    * 100% type annotated codebase.
    
    ## Tính năng của Pydantic
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/openapi-callbacks.md

    https://yourapi.com/invoices/?callback_url=https://www.external.org/events
    ```
    
    with a JSON body of:
    
    ```JSON
    {
        "id": "2expen51ve",
        "customer": "Mr. Richie Rich",
        "total": "9999"
    }
    ```
    
    then *your API* will process the invoice, and at some point later, send a callback request to the `callback_url` (the *external API*):
    
    ```
    https://www.external.org/events/invoices/2expen51ve
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. docs/en/docs/alternatives.md

    It has:
    
    * Seriously impressive performance.
    * WebSocket support.
    * In-process background tasks.
    * Startup and shutdown events.
    * Test client built on HTTPX.
    * CORS, GZip, Static Files, Streaming responses.
    * Session and Cookie support.
    * 100% test coverage.
    * 100% type annotated codebase.
    * Few hard dependencies.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/openapi-webhooks.md

    You also define in some way at which **moments** your app will send those requests or events.
    
    And **your users** define in some way (for example in a web dashboard somewhere) the **URL** where your app should send those requests.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  9. docs/en/mkdocs.yml

        - advanced/middleware.md
        - advanced/sub-applications.md
        - advanced/behind-a-proxy.md
        - advanced/templates.md
        - advanced/websockets.md
        - advanced/events.md
        - advanced/testing-websockets.md
        - advanced/testing-events.md
        - advanced/testing-dependencies.md
        - advanced/testing-database.md
        - advanced/async-tests.md
        - advanced/settings.md
        - advanced/openapi-callbacks.md
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

        return {"result": result}
    ```
    
    **Note**: This is the recommended way going forward, instead of using `startup` and `shutdown` events.
    
    Read more about it in the new docs: [Advanced User Guide: Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
    
    ### Docs
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
Back to top