Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 183 for these (0.15 sec)

  1. docs/en/docs/how-to/configure-swagger-ui.md

    <img src="/img/tutorial/extending-openapi/image03.png">
    
    ## Change the Theme
    
    The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle):
    
    ```Python hl_lines="3"
    {!../../../docs_src/configure_swagger_ui/tutorial002.py!}
    ```
    
    That configuration would change the syntax highlighting color theme:
    
    <img src="/img/tutorial/extending-openapi/image04.png">
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/handling-errors.md

    This is similar to the 200 HTTP status codes (from 200 to 299). Those "200" status codes mean that somehow there was a "success" in the request.
    
    The status codes in the 400 range mean that there was an error from the client.
    
    Remember all those **"404 Not Found"** errors (and jokes)?
    
    ## Use `HTTPException`
    
    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)
  3. docs/en/docs/tutorial/sql-databases.md

    !!! tip
        SQLAlchemy uses the term "**model**" to refer to these classes and instances that interact with the database.
    
        But Pydantic also uses the term "**model**" to refer to something different, the data validation, conversion, and documentation classes and instances.
    
    Import `Base` from `database` (the file `database.py` from above).
    
    Create classes that inherit from it.
    
    These classes are the SQLAlchemy models.
    
    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)
  4. docs/en/docs/advanced/settings.md

    This practice is common enough that it has a name, these environment variables are commonly placed in a file `.env`, and the file is called a "dotenv".
    
    !!! tip
        A file starting with a dot (`.`) is a hidden file in Unix-like systems, like Linux and macOS.
    
        But a dotenv file doesn't really have to have that exact filename.
    
    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/advanced/events.md

        You can probably skip this part.
    
    There's an alternative way to define this logic to be executed during *startup* and during *shutdown*.
    
    You can define event handlers (functions) that need to be executed before the application starts up, or when the application is shutting down.
    
    These functions can be declared with `async def` or normal `def`.
    
    ### `startup` event
    
    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)
  6. docs/en/docs/advanced/testing-dependencies.md

    In this case, you can override the dependency that calls that provider, and use a custom dependency that returns a mock user, only for your tests.
    
    ### Use the `app.dependency_overrides` attribute
    
    For these cases, your **FastAPI** application has an attribute `app.dependency_overrides`, it is a simple `dict`.
    
    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)
  7. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Dependencies with `yield`, `HTTPException`, `except` and Background Tasks
    
    !!! warning
        You most probably don't need these technical details, you can skip this section and continue below.
    
        These details are useful mainly if you were using a version of FastAPI prior to 0.106.0 and used resources from dependencies with `yield` in background tasks.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/additional-responses.md

        If you are starting with **FastAPI**, you might not need this.
    
    You can declare additional responses, with additional status codes, media types, descriptions, etc.
    
    Those additional responses will be included in the OpenAPI schema, so they will also appear in the API docs.
    
    But for those additional responses you have to make sure you return a `Response` like `JSONResponse` directly, with your status code and content.
    
    ## Additional Response with `model`
    
    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)
  9. docs/en/docs/tutorial/security/index.md

    ## **FastAPI** utilities
    
    FastAPI provides several tools for each of these security schemes in the `fastapi.security` module that simplify using these security mechanisms.
    
    In the next chapters you will see how to add security to your API using those tools provided by **FastAPI**.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  10. docs/en/docs/index.md

        * ReDoc.
    
    ---
    
    Coming back to the previous code example, **FastAPI** will:
    
    * Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
    * Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
        * If it is not, the client will see a useful, clear error.
    * Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
Back to top