Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 115 for Case (0.15 sec)

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

    ## Use Case
    
    Let's start with an example **use case** and then see how to solve it with this.
    
    Let's imagine that you have some **machine learning models** that you want to use to handle requests. 🤖
    
    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/deployment/index.md

    ## Deployment Strategies
    
    There are several ways to do it depending on your specific use case and the tools that you use.
    
    You could **deploy a server** yourself using a combination of tools, you could use a **cloud service** that does part of the work for you, or other possible options.
    
    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)
  3. docs/en/docs/tutorial/header-params.md

    So, by default, `Header` will convert the parameter names characters from underscore (`_`) to hyphen (`-`) to extract and document the headers.
    
    Also, HTTP headers are case-insensitive, so, you can declare them with standard Python style (also known as "snake_case").
    
    So, you can use `user_agent` as you normally would in Python code, instead of needing to capitalize the first letters as `User_Agent` or something similar.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/settings.md

    !!! tip
        If you want something quick to copy and paste, don't use this example, use the last one below.
    
    Then, when you create an instance of that `Settings` class (in this case, in the `settings` object), Pydantic will read the environment variables in a case-insensitive way, so, an upper-case variable `APP_NAME` will still be read for the attribute `app_name`.
    
    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/how-to/separate-openapi-schemas.md

    Now, there are some cases where you might want to have the **same schema for input and output**.
    
    Probably the main use case for this is if you already have some autogenerated client code/SDKs and you don't want to update all the autogenerated client code/SDKs yet, you probably will want to do it at some point, but maybe not right now.
    
    In that case, you can disable this feature in **FastAPI**, with the parameter `separate_input_output_schemas=False`.
    
    !!! info
    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)
  6. docs/en/docs/advanced/testing-dependencies.md

    You probably want to test the external provider once, but not necessarily call it for every test that runs.
    
    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
    
    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/pt/docs/tutorial/header-params.md

    Além disso, os cabeçalhos HTTP não diferenciam maiúsculas de minúsculas, portanto, você pode declará-los com o estilo padrão do Python (também conhecido como "snake_case").
    
    Portanto, você pode usar `user_agent` como faria normalmente no código Python, em vez de precisar colocar as primeiras letras em maiúsculas como `User_Agent` ou algo semelhante.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    For example:
    
    ```Python
    class Cat:
        def __init__(self, name: str):
            self.name = name
    
    
    fluffy = Cat(name="Mr Fluffy")
    ```
    
    In this case, `fluffy` is an instance of the class `Cat`.
    
    And to create `fluffy`, you are "calling" `Cat`.
    
    So, a Python class is also a **callable**.
    
    Then, in **FastAPI**, you could use a Python class as a dependency.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="4  12  20"
        {!> ../../../docs_src/dependencies/tutorial008.py!}
        ```
    
    And all of them can use `yield`.
    
    In this case `dependency_c`, to execute its exit code, needs the value from `dependency_b` (here named `dep_b`) to still be available.
    
    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)
  10. docs/en/docs/tutorial/sql-databases.md

    To create the `SessionLocal` class, use the function `sessionmaker`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### Create a `Base` class
    
    Now we will use the function `declarative_base()` that returns a class.
    
    Later we will inherit from this class to create each of the database models or classes (the ORM models):
    
    ```Python hl_lines="13"
    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)
Back to top