Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for sekonda (0.16 sec)

  1. docs/en/docs/tutorial/middleware.md

    And also after the `response` is generated, before returning it.
    
    For example, you could add a custom header `X-Process-Time` containing the time in seconds that it took to process the request and generate a response:
    
    ```Python hl_lines="10  12-13"
    {!../../../docs_src/middleware/tutorial001.py!}
    ```
    
    ## Other middlewares
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/additional-responses.md

    对于这些情况,你可以使用Python的技术,将 `dict` 与 `**dict_to_unpack` 解包:
    ```Python
    old_dict = {
        "old key": "old value",
        "second old key": "second old value",
    }
    new_dict = {**old_dict, "new key": "new value"}
    ```
    
    这里, new_dict 将包含来自 old_dict 的所有键值对加上新的键值对:
    ```python
    {
        "old key": "old value",
        "second old key": "second old value",
        "new key": "new value",
    }
    ```
    您可以使用该技术在路径操作中重用一些预定义的响应,并将它们与其他自定义响应相结合。
    **例如:**
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 15:53:39 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  3. tests/test_response_model_data_filter_no_inheritance.py

        response = client.post(
            "/users", json={"email": "******@****.***", "password": "secret"}
        )
        assert response.json() == {"email": "******@****.***"}
    
    
    def test_filter_second_level_model():
        response = client.get("/pets/1")
        assert response.json() == {
            "name": "Nibbler",
            "owner": {"email": "******@****.***"},
        }
    
    
    def test_list_of_models():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  4. docs/fr/docs/benchmarks.md

        * Si on compare Uvicorn, il faut le comparer à d'autre applications de serveurs comme Daphne, Hypercorn, uWSGI, etc.
    * **Starlette** :
        * A les seconde meilleures performances après Uvicorn. Starlette utilise en réalité Uvicorn. De ce fait, il ne peut qu’être plus "lent" qu'Uvicorn car il requiert l'exécution de plus de code.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:49:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. docs/en/docs/features.md

    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
        `**second_user_data` means:
    
        Pass the keys and values of the `second_user_data` dict directly as key-value arguments, equivalent to: `User(id=4, name="Mary", joined="2018-11-30")`
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  6. docs/zh/docs/features.md

    ```
    
    可以像这样来使用:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    
    !!! info
        `**second_user_data` 意思是:
    
        直接将`second_user_data`字典的键和值直接作为key-value参数传递,等同于:`User(id=4, name="Mary", joined="2018-11-30")`
    
    ### 编辑器支持
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. docs/em/docs/features.md

    ```
    
    👈 💪 ⤴️ ⚙️ 💖:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
        `**second_user_data` ⛓:
    
        🚶‍♀️ 🔑 & 💲 `second_user_data` #️⃣ 🔗 🔑-💲 ❌, 🌓: `User(id=4, name="Mary", joined="2018-11-30")`
    
    ### 👨‍🎨 🐕‍🦺
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-status-code.md

    * **`300`** and above are for "Redirection".  Responses with these status codes may or may not have a body, except for `304`, "Not Modified", which must not have one.
    * **`400`** and above are for "Client error" responses. These are the second type you would probably use the most.
        * An example is `404`, for a "Not Found" response.
        * For generic errors from the client, you can just use `400`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 4K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/dependencies/sub-dependencies.md

        ```
    
    It declares an optional query parameter `q` as a `str`, and then it just returns it.
    
    This is quite simple (not very useful), but will help us focus on how the sub-dependencies work.
    
    ## Second dependency, "dependable" and "dependant"
    
    Then you can create another dependency function (a "dependable") that at the same time declares a dependency of its own (so it is a "dependant" too):
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  10. tests/test_forms_from_non_typing_sequences.py

        response = client.post(
            "/form/python-list", data={"items": ["first", "second", "third"]}
        )
        assert response.status_code == 200, response.text
        assert response.json() == ["first", "second", "third"]
    
    
    def test_python_set_param_as_form():
        response = client.post(
            "/form/python-set", data={"items": ["first", "second", "third"]}
        )
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
Back to top