Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for more (0.13 sec)

  1. docs/em/docs/advanced/events.md

    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    📥, `shutdown` 🎉 🐕‍🦺 🔢 🔜 ✍ ✍ ⏸ `"Application shutdown"` 📁 `log.txt`.
    
    !!! info
         `open()` 🔢, `mode="a"` ⛓ "🎻",, ⏸ 🔜 🚮 ⏮️ ⚫️❔ 🔛 👈 📁, 🍵 📁 ⏮️ 🎚.
    
    !!! tip
        👀 👈 👉 💼 👥 ⚙️ 🐩 🐍 `open()` 🔢 👈 🔗 ⏮️ 📁.
    
        , ⚫️ 🔌 👤/🅾 (🔢/🔢), 👈 🚚 "⌛" 👜 ✍ 💾.
    
        ✋️ `open()` 🚫 ⚙️ `async` & `await`.
    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)
  2. docs/pt/docs/advanced/events.md

    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Aqui, a função de manipulação de evento `shutdown` irá escrever uma linha de texto `"Application shutdown"` no arquivo `log.txt`.
    
    !!! info "Informação"
        Na função `open()`, o `mode="a"` significa "acrescentar", então, a linha irá ser adicionada depois de qualquer coisa que esteja naquele arquivo, sem sobrescrever o conteúdo anterior.
    
    !!! tip "Dica"
    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)
  3. docs/en/docs/advanced/events.md

    ```Python hl_lines="8"
    {!../../../docs_src/events/tutorial001.py!}
    ```
    
    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
    
    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)
  4. docs/zh/docs/advanced/events.md

    使用 `shutdown` 事件声明 `app` 关闭时运行的函数:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    此处,`shutdown` 事件处理器函数在 `log.txt` 中写入一行文本 `Application shutdown`。
    
    !!! info "说明"
    
        `open()` 函数中,`mode="a"` 指的是**追加**。因此这行文本会添加在文件已有内容之后,不会覆盖之前的内容。
    
    !!! tip "提示"
    
        注意,本例使用 Python `open()` 标准函数与文件交互。
    
        这个函数执行 I/O(输入/输出)操作,需要等待内容写进磁盘。
    
        但 `open()` 函数不支持使用 `async` 与 `await`。
    
    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)
Back to top