Frontend Frameworks

httmock

A mocking library for requests in Python to test HTTP interactions.

Status
UnmaintainedNo commits in 2128 days.
Last checked
Checked · Oct 10, 2026
License
Open source
Pricing
Free tier · from $0

What it is

httmock is a Python library that allows developers to mock HTTP responses for testing purposes, supporting both Python 2.6+ and 3.2+. It simplifies the process of writing tests by enabling controlled simulation of network conditions without making actual HTTP calls.

httmock stands out as a lightweight, Python-specific library for mocking HTTP responses, offering simplicity and flexibility in isolating network interactions for robust testing.

When it fits — and when it doesn’t

A good fit for

  • Developers who need to mock HTTP responses for testing Python applications

  • Teams working on projects that require interaction with multiple APIs and need isolated testing environments

Look elsewhere if

  • Projects requiring real-time data from external services during tests

  • Applications where the focus is on performance testing rather than functional testing

Known weaknesses

Each one links to the public issue, changelog or docs page it came from, where we have one.

  1. 01

    No active development or maintenance

    The last release was several years ago, indicating that the project is no longer actively maintained. This can lead to compatibility issues with newer versions of Python and other dependencies.

  2. 02

    Complex setup for advanced scenarios

    Setting up complex mock responses or handling multiple URLs requires a deep understanding of the library's internal mechanisms, which may be challenging for users not familiar with its architecture.

  3. 03

    Limited support for asynchronous testing

    httmock does not natively support asynchronous HTTP libraries like aiohttp, requiring additional workarounds or custom implementations to mock responses in async tests.

What it does well

  • Mocks HTTP responses for testing purposes

  • Supports both Python 2.6+ and 3.2+

  • Simplifies writing tests by simulating network conditions

Pricing

Free tier
YesOpen source — free to use
Paid from
$0
Model
Flat rate
Enterprise plan
No

Pricing not independently confirmed — check the vendor’s page.

Performance benchmarks

How Fast Is It?

Set up httmock

Setup steps, common gotchas and what to check after 30 days.

Open the setup guide →