Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for agentzh (0.17 sec)

  1. tests/test_tutorial/test_header_params/test_tutorial001_an_py310.py

    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    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
    - 4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial001.py

    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    def test(path, headers, expected_status, expected_response):
        response = client.get(path, headers=headers)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_header_params/test_tutorial001_py310.py

    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    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
    - 4K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/header-params.md

    Таким образом вы можете использовать `user_agent`, как обычно, в коде Python, вместо того, чтобы вводить заглавные буквы как `User_Agent` или что-то подобное.
    
    Если по какой-либо причине вам необходимо отключить автоматическое преобразование подчеркиваний в дефисы, установите для параметра `convert_underscores` в `Header` значение `False`:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 8.7K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/header-params.md

    ## 自动转换
    
    `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。
    
    大部分标准请求头用**连字符**分隔,即**减号**(`-`)。
    
    但是 `user-agent` 这样的变量在 Python 中是无效的。
    
    因此,默认情况下,`Header` 把参数名中的字符由下划线(`_`)改为连字符(`-`)来提取并存档请求头 。
    
    同时,HTTP 的请求头不区分大小写,可以使用 Python 标准样式(即 **snake_case**)进行声明。
    
    因此,可以像在 Python 代码中一样使用 `user_agent` ,无需把首字母大写为 `User_Agent` 等形式。
    
    如需禁用下划线自动转换为连字符,可以把 `Header` 的 `convert_underscores` 参数设置为 `False`:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:42:51 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. docs/en/docs/release-notes.md

    * 📝 Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR [#5260](https://github.com/tiangolo/fastapi/pull/5260) by [@sjyothi54](https://github.com/sjyothi54).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  7. docs/em/docs/tutorial/header-params.md

    `Header` ✔️ 🐥 ➕ 🛠️ 🔛 🔝 ⚫️❔ `Path`, `Query` & `Cookie` 🚚.
    
    🌅 🐩 🎚 🎏 "🔠" 🦹, 💭 "➖ 🔣" (`-`).
    
    ✋️ 🔢 💖 `user-agent` ❌ 🐍.
    
    , 🔢, `Header` 🔜 🗜 🔢 📛 🦹 ⚪️➡️ 🎦 (`_`) 🔠 (`-`) ⚗ & 📄 🎚.
    
    , 🇺🇸🔍 🎚 💼-😛,, 👆 💪 📣 👫 ⏮️ 🐩 🐍 👗 (💭 "🔡").
    
    , 👆 💪 ⚙️ `user_agent` 👆 🛎 🔜 🐍 📟, ↩️ 💆‍♂ 🎯 🥇 🔤 `User_Agent` ⚖️ 🕳 🎏.
    
    🚥 🤔 👆 💪 ❎ 🏧 🛠️ 🎦 🔠, ⚒ 🔢 `convert_underscores` `Header` `False`:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. docs_src/header_params/tutorial001_an.py

    from typing import Union
    
    from fastapi import FastAPI, Header
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 259 bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/header-params.md

    Aber eine Variable wie `user-agent` ist in Python nicht gültig.
    
    Darum wird `Header` standardmäßig in Parameternamen den Unterstrich (`_`) zu einem Bindestrich (`-`) konvertieren.
    
    HTTP-Header sind außerdem unabhängig von Groß-/Kleinschreibung, darum können Sie sie mittels der Standard-Python-Schreibweise deklarieren (auch bekannt als "snake_case").
    
    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)
  10. docs/en/data/external_links.yml

      - author: New Relic
        author_link: https://newrelic.com
        link: https://newrelic.com/instant-observability/fastapi/e559ec64-f765-4470-a15f-1901fcebb468
        title: How to monitor FastAPI application performance using Python agent
      - author: Jean-Baptiste Rocher
        author_link: https://hashnode.com/@jibrocher
        link: https://dev.indooroutdoor.io/series/fastapi-react-poll-app
        title: Building the Poll App From Django Tutorial With FastAPI And React
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 21 20:57:27 GMT 2024
    - 21.3K bytes
    - Viewed (2)
Back to top