Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for promise (0.18 sec)

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

    !!! tip "Dica"
        O `shutdown` aconteceria quando você estivesse **encerrando** a aplicação.
    
        Talvez você precise inicializar uma nova versão, ou apenas cansou de executá-la. 🤷
    
    ### Função _lifespan_
    
    A primeira coisa a notar, é que estamos definindo uma função assíncrona com `yield`. Isso é muito semelhante à Dependências com `yield`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/header-params.md

    ## Automatic conversion
    
    `Header` has a little extra functionality on top of what `Path`, `Query` and `Cookie` provide.
    
    Most of the standard headers are separated by a "hyphen" character, also known as the "minus symbol" (`-`).
    
    But a variable like `user-agent` is invalid in Python.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/testing-dependencies.md

    You don't want the original dependency to run (nor any of the sub-dependencies it might have).
    
    Instead, you want to provide a different dependency that will be used only during tests (possibly only some specific tests), and will provide a value that can be used where the value of the original dependency was used.
    
    ### Use cases: external service
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/settings.md

    Most of these settings are variable (can change), like database URLs. And many could be sensitive, like secrets.
    
    For this reason it's common to provide them in environment variables that are read by the application.
    
    ## Environment Variables
    
    !!! tip
        If you already know what "environment variables" are and how to use them, feel free to skip to the next section below.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/separate-openapi-schemas.md

    <div class="screenshot">
    <img src="/img/tutorial/separate-openapi-schemas/image04.png">
    </div>
    
    With this feature from **Pydantic v2**, your API documentation is more **precise**, and if you have autogenerated clients and SDKs, they will be more precise too, with a better **developer experience** and consistency. 🎉
    
    ## Do not Separate Schemas
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/header-params.md

    === "Python 3.8+"
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/header_params/tutorial002.py!}
        ```
    
    !!! warning "Aviso"
        Antes de definir `convert_underscores` como `False`, lembre-se de que alguns proxies e servidores HTTP não permitem o uso de cabeçalhos com sublinhados.
    
    ## Cabeçalhos duplicados
    
    É possível receber cabeçalhos duplicados. Isso significa, o mesmo cabeçalho com vários valores.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/additional-responses.md

                    * **FastAPI** adds a reference here to the global JSON Schemas in another place in your OpenAPI instead of including it directly. This way, other applications and clients can use those JSON Schemas directly, provide better code generation tools, etc.
    
    The generated responses in the OpenAPI for this *path operation* will be:
    
    ```JSON hl_lines="3-12"
    {
        "responses": {
            "404": {
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/events.md

    ```
    
    ## Alternative Events (deprecated)
    
    !!! warning
        The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above. If you provide a `lifespan` parameter, `startup` and `shutdown` event handlers will no longer be called. It's all `lifespan` or all events, not both.
    
        You can probably skip this part.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python hl_lines="11"
        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    But then we get a `dict` in the parameter `commons` of the *path operation function*.
    
    And we know that editors can't provide a lot of support (like completion) for `dict`s, because they can't know their keys and value types.
    
    We can do better...
    
    ## What makes a dependency
    
    Up to now you have seen dependencies declared as functions.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/sql-databases.md

    Now, in the Pydantic *models* for reading, `Item` and `User`, add an internal `Config` class.
    
    This <a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">`Config`</a> class is used to provide configurations to Pydantic.
    
    In the `Config` class, set the attribute `orm_mode = True`.
    
    === "Python 3.10+"
    
        ```Python hl_lines="13  17-18  29  34-35"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
Back to top