Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 90 for Case (0.23 sec)

  1. docs/en/docs/advanced/index.md

    In the next sections you will see other options, configurations, and additional features.
    
    !!! tip
        The next sections are **not necessarily "advanced"**.
    
        And it's possible that for your use case, the solution is in one of them.
    
    ## Read the Tutorial first
    
    You could still use most of the features in **FastAPI** with the knowledge from the main [Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank}.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    The contents that you return from your *path operation function* will be put inside of that `Response`.
    
    And if that `Response` has a JSON media type (`application/json`), like is the case with the `JSONResponse` and `UJSONResponse`, the data you return will be automatically converted (and filtered) with any Pydantic `response_model` that you declared in the *path operation decorator*.
    
    !!! note
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. docs/en/docs/deployment/server-workers.md

            ```
    
        * So, the colon in `main:app` would be equivalent to the Python `import` part in `from main import app`.
    
    * `--workers`: The number of worker processes to use, each will run a Uvicorn worker, in this case, 4 workers.
    
    * `--worker-class`: The Gunicorn-compatible worker class to use in the worker processes.
        * Here we pass the class that Gunicorn can import and use with:
    
            ```Python
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/en/docs/deployment/docker.md

    In this case, if you had **multiple containers**, by default, when Prometheus came to **read the metrics**, it would get the ones for **a single container each time** (for the container that handled that particular request), instead of getting the **accumulated metrics** for all the replicated containers.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 34.3K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/security/simple-oauth2.md

        Any HTTP (error) status code 401 "UNAUTHORIZED" is supposed to also return a `WWW-Authenticate` header.
    
        In the case of bearer tokens (our case), the value of that header should be `Bearer`.
    
        You can actually skip that extra header and it would still work.
    
        But it's provided here to be compliant with the specifications.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/response-change-status-code.md

    You probably read before that you can set a default [Response Status Code](../tutorial/response-status-code.md){.internal-link target=_blank}.
    
    But in some cases you need to return a different status code than the default.
    
    ## Use case
    
    For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
    
    But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/extra-models.md

        {!> ../../../docs_src/extra_models/tutorial005.py!}
        ```
    
    ## Recap
    
    Use multiple Pydantic models and inherit freely for each case.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  8. docs/en/docs/tutorial/dependencies/index.md

    ## What is "Dependency Injection"
    
    **"Dependency Injection"** means, in programming, that there is a way for your code (in this case, your *path operation functions*) to declare things that it requires to work and use: "dependencies".
    
    And then, that system (in this case **FastAPI**) will take care of doing whatever is needed to provide your code with those needed dependencies ("inject" the dependencies).
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  9. docs/en/docs/help-fastapi.md

    ### Understand the question
    
    * Check if you can understand what is the **purpose** and use case of the person asking.
    
    * Then check if the question (the vast majority are questions) is **clear**.
    
    * In many cases the question asked is about an imaginary solution from the user, but there might be a **better** one. If you can understand the problem and use case better, you might be able to suggest a better **alternative solution**.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/path-params.md

    You can declare the type of a path parameter in the function, using standard Python type annotations:
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    In this case, `item_id` is declared to be an `int`.
    
    !!! check
        This will give you editor support inside of your function, with error checks, completion, etc.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top