Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 200 for it (0.14 sec)

  1. docs/en/docs/advanced/events.md

    The `lifespan` parameter of the `FastAPI` app takes an **async context manager**, so we can pass our new `lifespan` async context manager to it.
    
    ```Python hl_lines="22"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    ## Alternative Events (deprecated)
    
    !!! warning
    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)
  2. docs/en/docs/advanced/settings.md

    In the case of our dependency `get_settings()`, the function doesn't even take any arguments, so it always returns the same value.
    
    That way, it behaves almost as if it was just a global variable. But as it uses a dependency function, then we can override it easily for testing.
    
    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)
  3. docs/en/docs/tutorial/handling-errors.md

    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/en/docs/deployment/index.md

    # Deployment
    
    Deploying a **FastAPI** application is relatively easy.
    
    ## What Does Deployment Mean
    
    To **deploy** an application means to perform the necessary steps to make it **available to the users**.
    
    For a **web API**, it normally involves putting it in a **remote machine**, with a **server program** that provides good performance, stability, etc, so that your **users** can **access** the application efficiently and without interruptions or problems.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  5. fastapi/security/api_key.py

        This defines the name of the query parameter that should be provided in the request
        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
        Create an instance object and use that object as the dependency in `Depends()`.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/index.md

    ```
    
    </div>
    
    It is **HIGHLY encouraged** that you write or copy the code, edit it and run it locally.
    
    Using it in your editor is what really shows you the benefits of FastAPI, seeing how little code you have to write, all the type checks, autocompletion, etc.
    
    ---
    
    ## Install FastAPI
    
    The first step is to install FastAPI.
    
    For the tutorial, you might want to install it with all the optional dependencies and features:
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/sql-databases.md

    ```Python
    id = data["id"]
    ```
    
    it will also try to get it from an attribute, as in:
    
    ```Python
    id = data.id
    ```
    
    And with this, the Pydantic *model* is compatible with ORMs, and you can just declare it in the `response_model` argument in your *path operations*.
    
    You will be able to return a database model and it will read the data from it.
    
    #### Technical Details about ORM mode
    
    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)
  8. docs/en/docs/how-to/separate-openapi-schemas.md

    <img src="/img/tutorial/separate-openapi-schemas/image02.png">
    </div>
    
    This means that it will **always have a value**, it's just that sometimes the value could be `None` (or `null` in JSON).
    
    That means that, clients using your API don't have to check if the value exists or not, they can **assume the field will always be there**, but just that in some cases it will have the default value of `None`.
    
    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)
  9. docs/en/docs/advanced/testing-dependencies.md

    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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/path-params-numeric-validations.md

        ```
    
    !!! note
        A path parameter is always required as it has to be part of the path.
    
        So, you should declare it with `...` to mark it as required.
    
        Nevertheless, even if you declared it with `None` or set a default value, it would not affect anything, it would still be always required.
    
    ## Order the parameters as you need
    
    !!! tip
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top