Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 45 for light (0.04 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

        Some editors check for unused function parameters, and show them as errors.
    
        Using these `dependencies` in the *path operation decorator* you can make sure they are executed while avoiding editor/tooling errors.
    
        It might also help avoid confusion for new developers that see an unused parameter in your code and could think it's unnecessary.
    
    !!! info
        In this example we use invented custom headers `X-Key` and `X-Token`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 18 23:43:13 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. .github/DISCUSSION_TEMPLATE/questions.yml

          description: |
            Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.
    
            If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you.
    
          placeholder: |
            from fastapi import FastAPI
    
            app = FastAPI()
    
    
            @app.get("/")
            def read_root():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Aug 03 15:59:41 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/extra-models.md

    ```Python
    UserInDB(
        username="john",
        password="secret",
        email="******@****.***",
        full_name=None,
    )
    ```
    
    Or more exactly, using `user_dict` directly, with whatever contents it might have in the future:
    
    ```Python
    UserInDB(
        username = user_dict["username"],
        password = user_dict["password"],
        email = user_dict["email"],
        full_name = user_dict["full_name"],
    )
    ```
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  4. docs/en/docs/fastapi-people.md

    Here I'm also highlighting contributions from sponsors.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 16 23:54:24 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/events.md

    And then, right after the `yield`, we unload the model. This code will be executed **after** the application **finishes handling requests**, right before the *shutdown*. This could, for example, release resources like memory or a GPU.
    
    !!! tip
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. 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:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 18 23:43:13 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/handling-errors.md

    The benefit of raising an exception over `return`ing a value will be more evident in the section about Dependencies and Security.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 18 23:43:13 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/global-dependencies.md

    # Global Dependencies
    
    For some types of applications you might want to add dependencies to the whole application.
    
    Similar to the way you can [add `dependencies` to the *path operation decorators*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, you can add them to the `FastAPI` application.
    
    In that case, they will be applied to all the *path operations* in the application:
    
    === "Python 3.9+"
    
        ```Python hl_lines="16"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/encoder.md

    # JSON Compatible Encoder
    
    There are some cases where you might need to convert a data type (like a Pydantic model) to something compatible with JSON (like a `dict`, `list`, etc).
    
    For example, if you need to store it in a database.
    
    For that, **FastAPI** provides a `jsonable_encoder()` function.
    
    ## Using the `jsonable_encoder`
    
    Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/security/first-steps.md

    <img src="/img/tutorial/security/image01.png">
    
    !!! check "Authorize button!"
        You already have a shiny new "Authorize" button.
    
        And your *path operation* has a little lock in the top-right corner that you can click.
    
    And if you click it, you have a little authorization form to type a `username` and `password` (and other optional fields):
    
    <img src="/img/tutorial/security/image02.png">
    
    !!! note
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Jun 03 01:48:20 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top