Skip to main content

A utility for mocking out the Python HTTPX library.

Project description


codecov PyPi Version Python Versions

A utility for mocking out the Python HTTPX library.

import httpx
import respx

async def test_something():
    request ="", status_code=201)
    response = await"")
    assert request.called
    assert response.status_code == 201


Full documentation is available at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for respx, version 0.8
Filename, size File type Python version Upload date Hashes
Filename, size respx-0.8-py3-none-any.whl (14.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size respx-0.8.tar.gz (7.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page