Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for valueOf (0.14 sec)

  1. docs/en/docs/tutorial/response-model.md

        ```Python hl_lines="24"
        {!> ../../../docs_src/response_model/tutorial004.py!}
        ```
    
    and those default values won't be included in the response, only the values actually set.
    
    So, if you send a request to that *path operation* for the item with ID `foo`, the response (not including default values) will be:
    
    ```JSON
    {
        "name": "Foo",
        "price": 50.2
    }
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial003.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"]}),
            (
                "/items",
                [("x-token", "foo"), ("x-token", "bar")],
                200,
                {"X-Token values": ["foo", "bar"]},
            ),
        ],
    )
    def test(path, headers, expected_status, expected_response):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 12 14:52:00 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/path-params.md

    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Get the *enumeration value*
    
    You can get the actual value (a `str` in this case) using `model_name.value`, or in general, `your_enum_member.value`:
    
    ```Python hl_lines="20"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    !!! tip
        You could also access the value `"lenet"` with `ModelName.lenet.value`.
    
    #### Return *enumeration members*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_py310.py

        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_multi_query_values(client: TestClient):
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    @needs_py310
    def test_query_no_values(client: TestClient):
        url = "/items/"
        response = client.get(url)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/nosql-databases.md

    πŸ“₯ πŸ‘₯ πŸ”œ πŸ‘€ πŸ–Ό βš™οΈ **<a href="https://www.couchbase.com/" class="external-link" target="_blank">πŸ—„</a>**, <abbr title="Document here refers to a JSON object (a dict), with keys and values, and those values can also be other JSON objects, arrays (lists), numbers, strings, booleans, etc.">πŸ“„</abbr> 🧒 ☁ πŸ’½.
    
    πŸ‘† πŸ’ͺ πŸ› οΈ ⚫️ πŸ™† 🎏 ☁ πŸ’½ πŸ’–:
    
    * **✳**
    * **πŸ‘Έ**
    * **✳**
    * **πŸ‡ΈπŸ‡²**
    * **✳**, ♒️.
    
    !!! tip
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. fastapi/param_functions.py

            Doc(
                """
                Default value if the parameter field is not set.
                """
            ),
        ] = Undefined,
        *,
        default_factory: Annotated[
            Union[Callable[[], Any], None],
            Doc(
                """
                A callable to generate the default value.
    
                This doesn't affect `Path` parameters as the value is always required.
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  7. fastapi/utils.py

    
    def deep_dict_update(main_dict: Dict[Any, Any], update_dict: Dict[Any, Any]) -> None:
        for key, value in update_dict.items():
            if (
                key in main_dict
                and isinstance(main_dict[key], dict)
                and isinstance(value, dict)
            ):
                deep_dict_update(main_dict[key], value)
            elif (
                key in main_dict
                and isinstance(main_dict[key], list)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/first-steps.md

    ### Step 5: return the content
    
    ```Python hl_lines="8"
    {!../../../docs_src/first_steps/tutorial001.py!}
    ```
    
    You can return a `dict`, `list`, singular values as `str`, `int`, etc.
    
    You can also return Pydantic models (you'll see more about that later).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  9. tests/test_tuples.py

        response = client.post("/tuple-form/", data={"values": ("1", "2")})
        assert response.status_code == 200, response.text
        assert response.json() == [1, 2]
    
    
    def test_tuple_form_invalid():
        response = client.post("/tuple-form/", data={"values": ("1", "2", "3")})
        assert response.status_code == 422, response.text
    
        response = client.post("/tuple-form/", data={"values": ("1")})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_header_params/test_tutorial003_an.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):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
Back to top