Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 259 for would (0.02 seconds)

  1. docs/en/docs/advanced/behind-a-proxy.md

    # Behind a Proxy { #behind-a-proxy }
    
    In many situations, you would use a **proxy** like Traefik or Nginx in front of your FastAPI app.
    
    These proxies could handle HTTPS certificates and other things.
    
    ## Proxy Forwarded Headers { #proxy-forwarded-headers }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 16.4K bytes
    - Click Count (0)
  2. docs/en/docs/advanced/response-directly.md

    Now, let's see how you could use that to return a custom response.
    
    Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> response.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 3.1K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/openapi-webhooks.md

    {* ../../docs_src/openapi_webhooks/tutorial001_py39.py hl[9:13,36:53] *}
    
    The webhooks that you define will end up in the **OpenAPI** schema and the automatic **docs UI**.
    
    /// info
    
    The `app.webhooks` object is actually just an `APIRouter`, the same type you would use when structuring your app with multiple files.
    
    ///
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 2.9K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/sql-databases.md

    /// tip
    
    This is how you would handle **passwords**. Receive them, but don't return them in the API.
    
    You would also **hash** the values of the passwords before storing them, **never store them in plain text**.
    
    ///
    
    The fields of `HeroCreate` are:
    
    * `name`
    * `age`
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 02 05:06:56 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/events.md

    You could load it at the top level of the module/file, but that would also mean that it would **load the model** even if you are just running a simple automated test, then that test would be **slow** because it would have to wait for the model to load before being able to run an independent part of the code.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  6. fastapi/security/oauth2.py

            )
    
    
    class OAuth2(SecurityBase):
        """
        This is the base class for OAuth2 authentication, an instance of it would be used
        as a dependency. All other OAuth2 classes inherit from it and customize it for
        each OAuth2 flow.
    
        You normally would not create a new class inheriting from it but use one of the
        existing subclasses, and maybe compose them if you want to support multiple flows.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 22K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/extra-models.md

    If it was in a type annotation we could have used the vertical bar, as:
    
    ```Python
    some_variable: PlaneItem | CarItem
    ```
    
    But if we put that in the assignment `response_model=PlaneItem | CarItem` we would get an error, because Python would try to perform an **invalid operation** between `PlaneItem` and `CarItem` instead of interpreting that as a type annotation.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 6.9K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/query-params-str-validations.md

    Instead, use the actual default value of the function parameter. Otherwise, it would be inconsistent.
    
    For example, this is not allowed:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ...because it's not clear if the default value should be `"rick"` or `"morty"`.
    
    So, you would use (preferably):
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 16.7K bytes
    - Click Count (0)
  9. docs/en/docs/tutorial/body-nested-models.md

    This way, you don't have to know beforehand what the valid field/attribute names are (as would be the case with Pydantic models).
    
    This would be useful if you want to receive keys that you don't already know.
    
    ---
    
    Another useful case is when you want to have keys of another type (e.g., `int`).
    
    That's what we are going to see here.
    
    In this case, you would accept any `dict` as long as it has `int` keys with `float` values:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  10. docs/en/docs/advanced/generate-clients.md

    * Response payloads.
    
    You would also have **inline errors** for everything.
    
    And whenever you update the backend code, and **regenerate** the frontend, it would have any new *path operations* available as methods, the old ones removed, and any other change would be reflected on the generated code. 🤓
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 10.1K bytes
    - Click Count (1)
Back to Top