- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of over 10,000 for httpx (0.03 seconds)
-
scripts/playwright/sql_databases/image02.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.1K bytes - Click Count (0) -
scripts/playwright/cookie_param_models/image01.py
) try: for _ in range(3): try: response = httpx.get("http://localhost:8000/docs") except httpx.ConnectError: time.sleep(1) break with sync_playwright() as playwright: run(playwright) finally:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 1.2K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/async-tests.md
若要在測試中呼叫非同步函式,測試函式本身也必須是非同步的。AnyIO 為此提供了一個好用的外掛,讓我們可以標示某些測試函式以非同步方式執行。 ## HTTPX { #httpx } 即使你的 FastAPI 應用使用一般的 `def` 函式而非 `async def`,它在底層仍然是個 `async` 應用。 `TestClient` 在內部做了一些魔法,讓我們能在一般的 `def` 測試函式中,使用標準 pytest 來呼叫非同步的 FastAPI 應用。但當我們在非同步函式中使用它時,這個魔法就不再奏效了。也就是說,當以非同步方式執行測試時,就不能在測試函式內使用 `TestClient`。 `TestClient` 是建立在 [HTTPX](https://www.python-httpx.org) 之上,所幸我們可以直接使用它來測試 API。 ## 範例 { #example }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.5K bytes - Click Count (0) -
docs/en/docs/tutorial/testing.md
# Testing { #testing } Thanks to [Starlette](https://www.starlette.dev/testclient/), testing **FastAPI** applications is easy and enjoyable. It is based on [HTTPX](https://www.python-httpx.org), which in turn is designed based on Requests, so it's very familiar and intuitive. With it, you can use [pytest](https://docs.pytest.org/) directly with **FastAPI**. ## Using `TestClient` { #using-testclient } /// infoCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5.7K bytes - Click Count (0) -
docs/en/docs/advanced/async-tests.md
The `TestClient` is based on [HTTPX](https://www.python-httpx.org), and luckily, we can use it directly to test the API. ## Example { #example }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 3.8K bytes - Click Count (0) -
scripts/playwright/json_base64_bytes/image01.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 21 13:01:31 GMT 2026 - 1.1K bytes - Click Count (0) -
docs/zh/docs/advanced/async-tests.md
如果我们想在测试中调用异步函数,那么我们的测试函数必须是异步的。 AnyIO 为此提供了一个简洁的插件,它允许我们指定一些测试函数要异步调用。 ## HTTPX { #httpx } 即使您的 **FastAPI** 应用程序使用普通的 `def` 函数而不是 `async def` ,它本质上仍是一个 `async` 异步应用程序。 `TestClient` 在内部通过一些“魔法”操作,使得您可以在普通的 `def` 测试函数中调用异步的 FastAPI 应用程序,并使用标准的 pytest。但当我们在异步函数中使用它时,这种“魔法”就不再生效了。由于测试以异步方式运行,我们无法在测试函数中继续使用 `TestClient`。 `TestClient` 是基于 [HTTPX](https://www.python-httpx.org) 的。幸运的是,我们可以直接使用它来测试 API。 ## 示例 { #example }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.9K bytes - Click Count (0) -
scripts/playwright/sql_databases/image01.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.1K bytes - Click Count (0) -
pyproject.toml
"Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP", ] dependencies = [ "starlette>=0.46.0", "pydantic>=2.9.0", "typing-extensions>=4.8.0", "typing-inspection>=0.4.2", "annotated-doc>=0.0.2", ] [project.urls] Homepage = "https://github.com/fastapi/fastapi" Documentation = "https://fastapi.tiangolo.com/"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 23 12:36:49 GMT 2026 - 10.3K bytes - Click Count (0) -
scripts/playwright/query_param_models/image01.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 1.3K bytes - Click Count (0)