Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for get_burgers (0.08 sec)

  1. docs/ru/docs/async.md

    поддерживает современные возможности Python, код можно написать следующим образом:
    
    ```Python
    burgers = await get_burgers(2)
    ```
    
    Главное здесь слово `await`. Оно сообщает интерпретатору, что необходимо дождаться ⏸
    пока `get_burgers(2)` закончит свои дела 🕙, и только после этого сохранить результат в `burgers`.
    Зная это, Python может пока переключиться на выполнение других задач 🔀 ⏯
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 39.9K bytes
    - Viewed (0)
  2. docs/pt/docs/async.md

    ```Python
    # Isso não irá funcionar, porquê get_burgers foi definido com: async def
    burgers = get_burgers(2)
    ```
    
    ---
    
    Então, se você está usando uma biblioteca que diz que você pode chamá-la com `await`, você precisa criar as *funções de operação de rota* com `async def`, como em:
    
    ```Python hl_lines="2 3"
    @app.get('/burgers')
    async def read_burgers():
        burgers = await get_burgers(2)
        return burgers
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  3. docs/tr/docs/async.md

    Sonuçları vermeden önce beklemeyi gerektirecek ve yeni Python özelliklerini destekleyen bir işlem olduğunda aşağıdaki gibi kodlayabilirsiniz:
    
    ```Python
    burgers = await get_burgers(2)
    ```
    
    Buradaki `await` anahtari Python'a, sonuçları `burgers` degiskenine atamadan önce `get_burgers(2)` kodunun işini bitirmesini 🕙 beklemesi gerektiğini söyler. Bununla Python, bu ara zamanda başka bir şey 🔀 ⏯ yapabileceğini bilecektir (başka bir istek almak gibi).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. docs/en/docs/async.md

    When there is an operation that will require waiting before giving the results and has support for these new Python features, you can code it like:
    
    ```Python
    burgers = await get_burgers(2)
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Aug 28 23:33:37 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  5. docs/es/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 19 18:15:21 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  6. docs/em/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    🔑 📥 `await`. ⚫️ 💬 🐍 👈 ⚫️ ✔️ ⌛ ⏸ `get_burgers(2)` 🏁 🔨 🚮 👜 👶 ⏭ ♻ 🏁 `burgers`. ⏮️ 👈, 🐍 🔜 💭 👈 ⚫️ 💪 🚶 & 🕳 🙆 👶 👶 👐 (💖 📨 ➕1️⃣ 📨).
    
    `await` 👷, ⚫️ ✔️ 🔘 🔢 👈 🐕‍🦺 👉 🔀. 👈, 👆 📣 ⚫️ ⏮️ `async def`:
    
    ```Python hl_lines="1"
    async def get_burgers(number: int):
        # Do some asynchronous stuff to create the burgers
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  7. docs/fr/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  8. docs/de/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  9. docs/zh/docs/async.md

    当有一个操作需要等待才能给出结果,且支持这个新的 Python 特性时,您可以编写如下代码:
    
    ```Python
    burgers = await get_burgers(2)
    ```
    
    这里的关键是 `await`。它告诉 Python 它必须等待 ⏸ `get_burgers(2)` 完成它的工作 🕙 ,然后将结果存储在 `burgers` 中。这样,Python 就会知道此时它可以去做其他事情 🔀 ⏯ (比如接收另一个请求)。
    
    要使 `await` 工作,它必须位于支持这种异步机制的函数内。因此,只需使用 `async def` 声明它:
    
    ```Python hl_lines="1"
    async def get_burgers(number: int):
        # Do some asynchronous stuff to create the burgers
        return burgers
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  10. docs/ko/docs/async.md

    ```Python
    burgers = await get_burgers(2)
    ```
    
    여기서 핵심은 `await`입니다. 이것은 파이썬에게 `burgers` 결과를 저장하기 이전에 `get_burgers(2)`의 작업이 완료되기를 🕙 기다리라고 ⏸ 말합니다. 이로 인해, 파이썬은 그동안 (다른 요청을 받는 것과 같은) 다른 작업을 수행해도 된다는 것을 🔀 ⏯ 알게될 것입니다.
    
    `await`가 동작하기 위해, 이것은 비동기를 지원하는 함수 내부에 있어야 합니다. 이를 위해서 함수를 `async def`를 사용해 정의하기만 하면 됩니다:
    
    ```Python hl_lines="1"
    async def get_burgers(number: int):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 26.7K bytes
    - Viewed (0)
Back to top