Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for scaling (0.2 sec)

  1. docs/en/docs/tutorial/dependencies/sub-dependencies.md

        But **FastAPI** will know that it has to solve `query_extractor` first, to pass the results of that to `query_or_cookie_extractor` while calling it.
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/encoder.md

        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
    
    The result of calling it is something that can be encoded with the Python standard <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/index.md

    !!! tip
        You'll see what other "things", apart from functions, can be used as dependencies in the next chapter.
    
    Whenever a new request arrives, **FastAPI** will take care of:
    
    * Calling your dependency ("dependable") function with the correct parameters.
    * Get the result from your function.
    * Assign that result to the parameter in your *path operation function*.
    
    ```mermaid
    graph TB
    
    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)
  4. docs/en/docs/advanced/custom-response.md

    {!../../../docs_src/custom_response/tutorial004.py!}
    ```
    
    In this example, the function `generate_html_response()` already generates and returns a `Response` instead of returning the HTML in a `str`.
    
    By returning the result of calling `generate_html_response()`, you are already returning a `Response` that will override the default **FastAPI** behavior.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/nosql-databases-couchbase.md

    ### Create the `FastAPI` app
    
    ```Python hl_lines="46"
    {!../../../docs_src/nosql_databases/tutorial001.py!}
    ```
    
    ### Create the *path operation function*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. docs/en/docs/python-types.md

    ## Motivation
    
    Let's start with a simple example:
    
    ```Python
    {!../../../docs_src/python_types/tutorial001.py!}
    ```
    
    Calling this program outputs:
    
    ```
    John Doe
    ```
    
    The function does the following:
    
    * Takes a `first_name` and `last_name`.
    * Converts the first letter of each one to upper case with `title()`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  7. docs/en/docs/release-notes.md

        * PR [#294](https://github.com/tiangolo/fastapi/pull/294).
    
    ## 0.28.0
    
    * Implement dependency cache per request.
        * This avoids calling each dependency multiple times for the same request.
        * This is useful while calling external services, performing costly computation, etc.
    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)
  8. docs/en/docs/advanced/testing-dependencies.md

    An example could be that you have an external authentication provider that you need to call.
    
    You send it a token and it returns an authenticated user.
    
    This provider might be charging you per request, and calling it might take some extra time than if you had a fixed mock user for tests.
    
    You probably want to test the external provider once, but not necessarily call it for every test that runs.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/handling-errors.md

    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    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)
  10. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    ```Python
    class Cat:
        def __init__(self, name: str):
            self.name = name
    
    
    fluffy = Cat(name="Mr Fluffy")
    ```
    
    In this case, `fluffy` is an instance of the class `Cat`.
    
    And to create `fluffy`, you are "calling" `Cat`.
    
    So, a Python class is also a **callable**.
    
    Then, in **FastAPI**, you could use a Python class as a dependency.
    
    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)
Back to top