httmock
A mocking library for requests in Python to test HTTP interactions.
Pricing
Free tier
Flat rate
Adoption
↘CoolingLicense
Open Source
Data freshness
Aging · Jun 8, 2026Overview
What is httmock?
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.
Key differentiator
“httmock stands out as a lightweight, Python-specific library for mocking HTTP responses, offering simplicity and flexibility in isolating network interactions for robust testing.”
Capability profile
Capability Radar
Honest assessment
Strengths & Weaknesses
↑ Strengths
↓ Weaknesses
The official documentation lacks comprehensive guides and practical examples, making it difficult for new users to understand how to use the library effectively.
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.
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.
httmock does not natively support asynchronous HTTP libraries like aiohttp, requiring additional workarounds or custom implementations to mock responses in async tests.
Fit analysis
Who is it for?
✓ Best 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
✕ Not a fit for
Projects requiring real-time data from external services during tests
Applications where the focus is on performance testing rather than functional testing
Cost structure
Pricing
Free Tier
Available
Open source — free to use
Starts at
$0
Model
Flat rate
Enterprise
None
Performance benchmarks
How Fast Is It?
Ecosystem
Relationships
Alternatives
Next step
Get Started with httmock
Step-by-step setup guide with code examples and common gotchas.