Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 76 of 76 for define (0.41 sec)

  1. docs/pt/docs/python-types.md

    Para declarar esses tipos e os tipos internos, você pode usar o módulo Python padrão `typing`.
    
    Ele existe especificamente para suportar esses type hints.
    
    #### `List`
    
    Por exemplo, vamos definir uma variável para ser uma `lista` de `str`.
    
    Em `typing`, importe `List` (com um `L` maiúsculo):
    
    ```Python hl_lines="1"
    {!../../../docs_src/python_types/tutorial006.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. docs/pt/docs/deployment/versions.md

    Se você usar qualquer outra ferramenta para gerenciar suas instalações, como Poetry, Pipenv ou outras, todas elas têm uma maneira que você pode usar para definir as versões específicas dos seus pacotes.
    
    ## Versões disponíveis
    
    Você pode ver as versões disponíveis (por exemplo, para verificar qual é a versão atual) em [Release Notes](../release-notes.md){.internal-link target=\_blank}.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 29 20:14:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  3. docs/zh/docs/async.md

        return burgers
    ```
    
    使用 `async def`,Python 就知道在该函数中,它将遇上 `await`,并且它可以"暂停" ⏸ 执行该函数,直至执行其他操作 🔀 后回来。
    
    当你想调用一个 `async def` 函数时,你必须"等待"它。因此,这不会起作用:
    
    ```Python
    # This won't work, because get_burgers was defined with: async def
    burgers = get_burgers(2)
    ```
    
    ---
    
    因此,如果您使用的库告诉您可以使用 `await` 调用它,则需要使用 `async def` 创建路径操作函数 ,如:
    
    ```Python hl_lines="2-3"
    @app.get('/burgers')
    async def read_burgers():
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 21.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    So, a Python class is also a **callable**.
    
    Then, in **FastAPI**, you could use a Python class as a dependency.
    
    What FastAPI actually checks is that it is a "callable" (function, class or anything else) and the parameters defined.
    
    If you pass a "callable" as a dependency in **FastAPI**, it will analyze the parameters for that "callable", and process them in the same way as the parameters for a *path operation function*. Including sub-dependencies.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/handling-errors.md

    # Handling Errors
    
    There are many situations in which you need to notify an error to a client that is using your API.
    
    This client could be a browser with a frontend, a code from someone else, an IoT device, etc.
    
    You could need to tell the client that:
    
    * The client doesn't have enough privileges for that operation.
    * The client doesn't have access to that resource.
    * The item the client was trying to access doesn't exist.
    * etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  6. docs/em/docs/async.md

    🕐❔ 👆 💚 🤙 `async def` 🔢, 👆 ✔️ "⌛" ⚫️. , 👉 🏆 🚫 👷:
    
    ```Python
    # This won't work, because get_burgers was defined with: async def
    burgers = get_burgers(2)
    ```
    
    ---
    
    , 🚥 👆 ⚙️ 🗃 👈 💬 👆 👈 👆 💪 🤙 ⚫️ ⏮️ `await`, 👆 💪 ✍ *➡ 🛠️ 🔢* 👈 ⚙️ ⚫️ ⏮️ `async def`, 💖:
    
    ```Python hl_lines="2-3"
    @app.get('/burgers')
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.7K bytes
    - Viewed (0)
Back to top