Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Connection (0.19 sec)

  1. docs/en/docs/advanced/websockets.md

    <img src="/img/tutorial/websockets/image03.png">
    
    You can send (and receive) many messages:
    
    <img src="/img/tutorial/websockets/image04.png">
    
    And all of them will use the same WebSocket connection.
    
    ## Using `Depends` and others
    
    In WebSocket endpoints you can import from `fastapi` and use:
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. docs/en/docs/reference/testclient.md

    # Test Client - `TestClient`
    
    You can use the `TestClient` class to test FastAPI applications without creating an actual HTTP and socket connection, just communicating directly with the FastAPI code.
    
    Read more about it in the [FastAPI docs for Testing](https://fastapi.tiangolo.com/tutorial/testing/).
    
    You can import it directly from `fastapi.testclient`:
    
    ```python
    from fastapi.testclient import TestClient
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 450 bytes
    - Viewed (0)
  3. docs/en/docs/deployment/concepts.md

    And it will work and will be useful **during development**.
    
    But if your connection to the server is lost, the **running process** will probably die.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  4. fastapi/exceptions.py

                    """
                ),
            ],
            reason: Annotated[
                Union[str, None],
                Doc(
                    """
                    The reason to close the WebSocket connection.
    
                    It is UTF-8-encoded data. The interpretation of the reason is up to the
                    application, it is not specified by the WebSocket specification.
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  5. fastapi/dependencies/utils.py

                required_params=dependant.body_params, received_body=body
            )
            values.update(body_values)
            errors.extend(body_errors)
        if dependant.http_connection_param_name:
            values[dependant.http_connection_param_name] = request
        if dependant.request_param_name and isinstance(request, Request):
            values[dependant.request_param_name] = request
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/sql-databases.md

        This is to prevent accidentally sharing the same connection for different things (for different requests).
    
        But in FastAPI, using normal functions (`def`) more than one thread could interact with the database for the same request, so we need to make SQLite know that it should allow that with `connect_args={"check_same_thread": False}`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    !!! tip
    
        Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).
    
        So, this way you will probably have cleaner code.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/events.md

    This can be very useful for setting up **resources** that you need to use for the whole app, and that are **shared** among requests, and/or that you need to **clean up** afterwards. For example, a database connection pool, or loading a shared machine learning model.
    
    ## Use Case
    
    Let's start with an example **use case** and then see how to solve it with this.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. docs/en/docs/release-notes.md

    Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).
    
    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)
  10. docs/en/docs/async.md

    This is the case for most of the web applications.
    
    Many, many users, but your server is waiting 🕙 for their not-so-good connection to send their requests.
    
    And then waiting 🕙 again for the responses to come back.
    
    This "waiting" 🕙 is measured in microseconds, but still, summing it all, it's a lot of waiting in the end.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
Back to top