Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 394 for Parameters (0.19 sec)

  1. docs/en/docs/reference/parameters.md

    # Request Parameters
    
    Here's the reference information for the request parameters.
    
    These are the special functions that you can put in *path operation function* parameters or dependency functions with `Annotated` to get data from the request.
    
    It includes:
    
    * `Query()`
    * `Path()`
    * `Body()`
    * `Cookie()`
    * `Header()`
    * `Form()`
    * `File()`
    
    You can import them all directly from `fastapi`:
    
    ```python
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 603 bytes
    - Viewed (0)
  2. docs/de/docs/reference/parameters.md

    # Request-Parameter
    
    Hier die Referenzinformationen für die Request-Parameter.
    
    Dies sind die Sonderfunktionen, die Sie mittels `Annotated` in *Pfadoperation-Funktion*-Parameter oder Abhängigkeitsfunktionen einfügen können, um Daten aus dem Request abzurufen.
    
    Dies beinhaltet:
    
    * `Query()`
    * `Path()`
    * `Body()`
    * `Cookie()`
    * `Header()`
    * `Form()`
    * `File()`
    
    Sie können diese alle direkt von `fastapi` importieren:
    
    ```python
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:17:26 GMT 2024
    - 635 bytes
    - Viewed (0)
  3. tests/test_request_body_parameters_media_type.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  4. tests/test_repeated_parameter_alias.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/{repeated_alias}")
    def get_parameters_with_repeated_aliases(
        path: str = Path(..., alias="repeated_alias"),
        query: str = Query(..., alias="repeated_alias"),
    ):
        return {"path": path, "query": query}
    
    
    client = TestClient(app)
    
    
    def test_get_parameters():
        response = client.get("/test_path", params={"repeated_alias": "test_query"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  5. tests/test_include_router_defaults_overrides.py

                    "get": {
                        "tags": ["path1a", "path1b"],
                        "summary": "Path1 Override",
                        "operationId": "path1_override_override1_get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Level1", "type": "string"},
                                "name": "level1",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  6. docs_src/dependency_testing/tutorial001_py310.py

    app = FastAPI()
    
    
    async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    @app.get("/items/")
    async def read_items(commons: dict = Depends(common_parameters)):
        return {"message": "Hello Items!", "params": commons}
    
    
    @app.get("/users/")
    async def read_users(commons: dict = Depends(common_parameters)):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/path-params.md

    ```
    /files/{file_path:path}
    ```
    
    In this case, the name of the parameter is `file_path`, and the last part, `:path`, tells it that the parameter should match any *path*.
    
    So, you can use it with:
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_params/tutorial004.py!}
    ```
    
    !!! tip
    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)
  8. fastapi/param_functions.py

    _Unset: Any = Undefined
    
    
    def Path(  # noqa: N802
        default: Annotated[
            Any,
            Doc(
                """
                Default value if the parameter field is not set.
    
                This doesn't affect `Path` parameters as the value is always required.
                The parameter is available only for compatibility.
                """
            ),
        ] = ...,
        *,
        default_factory: Annotated[
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  9. docs/en/docs/alternatives.md

    It is designed to have functions that receive two parameters, one "request" and one "response". Then you "read" parts from the request, and "write" parts to the response. Because of this design, it is not possible to declare request parameters and bodies with standard Python type hints as function parameters.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_bigger_applications/test_main_an.py

                "/users/": {
                    "get": {
                        "tags": ["users"],
                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Token", "type": "string"},
                                "name": "token",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
Back to top