Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for Sensing (0.3 sec)

  1. docs/en/docs/advanced/async-tests.md

    Being able to use asynchronous functions in your tests could be useful, for example, when you're querying your database asynchronously. Imagine you want to test sending requests to your FastAPI application and then verify that your backend successfully wrote the correct data in the database, while using an async database library.
    
    Let's look at how we can make that work.
    
    ## pytest.mark.anyio
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 12:07:15 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    2. By using a `with` block, we make sure that the file-like object is closed after the generator function is done. So, after it finishes sending the response.
    3. This `yield from` tells the function to iterate over that thing named `file_like`. And then, for each part iterated, yield that part as coming from this generator function.
    
    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)
  3. docs/en/docs/advanced/response-cookies.md

        So, you will have to make sure your data is of the correct type. E.g. it is compatible with JSON, if you are returning a `JSONResponse`.
    
        And also that you are not sending any data that should have been filtered by a `response_model`.
    
    ### More info
    
    !!! note "Technical Details"
        You could also use `from starlette.responses import Response` or `from starlette.responses import JSONResponse`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/background-tasks.md

    This includes, for example:
    
    * Email notifications sent after performing an action:
        * As connecting to an email server and sending an email tends to be "slow" (several seconds), you can return the response right away and send the email notification in the background.
    * Processing data:
    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)
  5. docs/en/docs/tutorial/header-params.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/header_params/tutorial003.py!}
        ```
    
    If you communicate with that *path operation* sending two HTTP headers like:
    
    ```
    X-Token: foo
    X-Token: bar
    ```
    
    The response would be like:
    
    ```JSON
    {
        "X-Token values": [
            "bar",
            "foo"
        ]
    }
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/handling-errors.md

    You could use it while developing your app to log the body and debug it, return it to the user, etc.
    
    ```Python hl_lines="14"
    {!../../../docs_src/handling_errors/tutorial005.py!}
    ```
    
    Now try sending an invalid item like:
    
    ```JSON
    {
      "title": "towel",
      "size": "XL"
    }
    ```
    
    You will receive a response telling you that the data is invalid containing the received body:
    
    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)
  7. docs/en/docs/tutorial/body.md

    !!! info
        To send data, you should use one of: `POST` (the more common), `PUT`, `DELETE` or `PATCH`.
    
        Sending a body with a `GET` request has an undefined behavior in the specifications, nevertheless, it is supported by FastAPI, only for very complex/extreme use cases.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  8. docs/en/docs/deployment/docker.md

    3. Install Poetry in this Docker stage.
    
    4. Copy the `pyproject.toml` and `poetry.lock` files to the `/tmp` directory.
    
        Because it uses `./poetry.lock*` (ending with a `*`), it won't crash if that file is not available yet.
    
    5. Generate the `requirements.txt` file.
    
    6. This is the final stage, anything here will be preserved in the final container image.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top