FICHA · MANJARO

python-respx

Mock HTTPX with awesome request patterns and response side effects

  • Library
  • Dev
  • NETWORK
  • Dependency only
official+codex · reviewed · May 28, 2026 description in en

Description

Mocks HTTPX requests so Python tests can control how HTTP clients respond without reaching the network. It supports matching request patterns and defining response effects, which helps test success paths, retries, timeouts, and failures.

Developers use it in test suites for applications built on HTTPX. The mocked behavior should mirror real services closely enough, especially for authentication, streaming, redirects, and error handling.

Permissions

Permissions not analysed for this source yet.