Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for HTTPX (0.02 sec)

  1. docs/zh/docs/tutorial/testing.md

    它基于 <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a>, 而HTTPX又是基于Requests设计的,所以很相似且易懂。
    
    有了它,你可以直接与**FastAPI**一起使用 <a href="https://docs.pytest.org/" class="external-link" target="_blank">pytest</a>。
    
    ## 使用 `TestClient`
    
    /// info | "信息"
    
    要使用 `TestClient`,先要安装 <a href="https://www.python-httpx.org" class="external-link" target="_blank">`httpx`</a>.
    
    例:`pip install httpx`.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. scripts/playwright/sql_databases/image02.py

        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/sql_databases/tutorial002.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:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/testing.md

    /// info | "Informação"
    
    Para usar o `TestClient`, primeiro instale o <a href="https://www.python-httpx.org" class="external-link" target="_blank">`httpx`</a>.
    
    Certifique-se de criar um [ambiente virtual](../virtual-environments.md){.internal-link target=_blank}, ativá-lo e instalá-lo, por exemplo:
    
    ```console
    $ pip install httpx
    ```
    
    ///
    
    Importe `TestClient`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  4. scripts/playwright/cookie_param_models/image01.py

    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/cookie_param_models/tutorial001.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:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/testing.md

    <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a> がベースなので、非常に使いやすく直感的です。
    
    これを使用すると、**FastAPI** と共に <a href="https://docs.pytest.org/" class="external-link" target="_blank">pytest</a> を直接利用できます。
    
    ## `TestClient` を使用
    
    `TestClient` をインポートします。
    
    `TestClient` を作成し、**FastAPI** に渡します。
    
    `test_` から始まる名前の関数を作成します (これは `pytest` の標準的なコンベンションです)。
    
    `httpx` と同じ様に `TestClient` オブジェクトを使用します。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  6. scripts/playwright/sql_databases/image01.py

        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/sql_databases/tutorial001.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:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  7. scripts/playwright/query_param_models/image01.py

    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/query_param_models/tutorial001.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:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/async-tests.md

    O `TestClient` é baseado no <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a>, e felizmente nós podemos utilizá-lo diretamente para testar a API.
    
    ## Exemplo
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/testing.md

    ## Verwendung von `TestClient`
    
    /// info
    
    Um `TestClient` zu verwenden, installieren Sie zunächst <a href="https://www.python-httpx.org" class="external-link" target="_blank">`httpx`</a>.
    
    Z. B. `pip install httpx`.
    
    ///
    
    Importieren Sie `TestClient`.
    
    Erstellen Sie einen `TestClient`, indem Sie ihm Ihre **FastAPI**-Anwendung übergeben.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/testing.md

    ## Использование класса `TestClient`
    
    /// info | "Информация"
    
    Для использования класса `TestClient` необходимо установить библиотеку <a href="https://www.python-httpx.org" class="external-link" target="_blank">`httpx`</a>.
    
    Например, так: `pip install httpx`.
    
    ///
    
    Импортируйте `TestClient`.
    
    Создайте объект `TestClient`, передав ему в качестве параметра Ваше приложение **FastAPI**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top