Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 84 for _values (0.17 sec)

  1. docs_src/header_params/tutorial003_an_py39.py

    from typing import Annotated, List, Union
    
    from fastapi import FastAPI, Header
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 240 bytes
    - Viewed (0)
  2. docs_src/header_params/tutorial003_an.py

    from fastapi import FastAPI, Header
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 269 bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/dependencies/sub-dependencies.md

    🏧 😐 πŸŒβ” πŸ‘† πŸ’­ πŸ‘† πŸ’ͺ πŸ”— πŸ€™ πŸ”  πŸ” (🎲 πŸ’— πŸ•°) 🎏 πŸ“¨ ↩️ βš™οΈ "πŸ’Ύ" πŸ’², πŸ‘† πŸ’ͺ βš’ πŸ”’ `use_cache=False` πŸ•β” βš™οΈ `Depends`:
    
    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
        return {"fresh_value": fresh_value}
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/extra-data-types.md

            * In requests, a list will be read, eliminating duplicates and converting it to a `set`.
            * In responses, the `set` will be converted to a `list`.
            * The generated schema will specify that the `set` values are unique (using JSON Schema's `uniqueItems`).
    * `bytes`:
        * Standard Python `bytes`.
        * In requests and responses will be treated as `str`.
        * The generated schema will specify that it's a `str` with `binary` "format".
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/header-params.md

        ```
    
    Wenn Sie mit einer *Pfadoperation* kommunizieren, die zwei HTTP-Header sendet, wie:
    
    ```
    X-Token: foo
    X-Token: bar
    ```
    
    Dann wΓ€re die Response:
    
    ```JSON
    {
        "X-Token values": [
            "bar",
            "foo"
        ]
    }
    ```
    
    ## Zusammenfassung
    
    Deklarieren Sie Header mittels `Header`, auf die gleiche Weise wie bei `Query`, `Path` und `Cookie`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:00:50 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  6. docs/uk/docs/tutorial/body.md

    ## Π‘Π΅Π· Pydantic
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/sql-databases-peewee.md

    The `ContextVar` has to be created at the top of the module, like:
    
    ```Python
    some_var = ContextVar("some_var", default="default value")
    ```
    
    To set a value used in the current "context" (e.g. for the current request) use:
    
    ```Python
    some_var.set("new value")
    ```
    
    To get a value anywhere inside of the context (e.g. in any part handling the current request) use:
    
    ```Python
    some_var.get()
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (1)
  8. docs/en/docs/tutorial/security/simple-oauth2.md

        ```Python hl_lines="80-83"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    #### About `**user_dict`
    
    `UserInDB(**user_dict)` means:
    
    *Pass the keys and values of the `user_dict` directly as key-value arguments, equivalent to:*
    
    ```Python
    UserInDB(
        username = user_dict["username"],
        email = user_dict["email"],
        full_name = user_dict["full_name"],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  9. docs/en/docs/async.md

    Common examples of CPU bound operations are things that require complex math processing.
    
    For example:
    
    * **Audio** or **image processing**.
    * **Computer vision**: an image is composed of millions of pixels, each pixel has 3 values / colors, processing that normally requires computing something on those pixels, all at the same time.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_header_params/test_tutorial003_an_py39.py

    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            # TODO: fix this, is it a bug?
            # ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}),
        ],
    )
    def test(path, headers, expected_status, expected_response, client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top