Our take
Inactiveno commits in over a year- Activity
- 20
- Community
- 53
- Issues
- 21
- Pull requests
- 21
-1 stars in the last 28 days
httmock offers a focused way to mock requests calls, but its inactive maintenance status makes it important to check compatibility before adopting it for new work.
Good fit if
- Your Python code makes HTTP calls through requests and you want to supply mocked responses in tests.
- You need URL-based handlers or a catch-all handler, and the library works with your Python environment.
- You can assess and manage the risk of depending on a project with no recent commits or releases.
Look elsewhere if
- You need evidence of active maintenance or recent issue and pull request activity. The project is marked inactive, with no recent commits, releases, issue closures, or merged pull requests.
- You require a clearly established license. GitHub reports the license as NOASSERTION.
- You need documented CI or test setup; neither is detected in the supplied project facts.
All health signals
| Last commit | 2023-09-29 (3.1 years ago) |
|---|---|
| Commits, last 90 days | 0 |
| Releases, last 12 months | 0 |
| Contributors | 23 (top contributor: 63% of commits) |
| Issues closed, last 90 days | 0 |
| Pull requests merged, last 90 days | 0 |
| Project age | 13 years |
Checked on 2026-10-19 with the GitHub API.
Project history
Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.
Stars
471Forks
59Change since Nov 3, 2026: 0 stars·0 forks
Overview
httmock is a Python mocking library built on the requests HTTP library. It helps Python developers test code that makes HTTP calls through requests, including libraries that contact third-party APIs, without relying on live services for the mocked interactions.
Handlers can match requests by URL or intercept all requests in a test context, then return response content, status codes, headers, and cookies. The README describes support for Python 2.7 and Python 3.4+.
Key Features
- Intercepts HTTP calls made with
requestswithin anHTTMockcontext. - Matches requests conditionally with the
urlmatchdecorator. - Uses
all_requeststo handle requests without URL-based matching. - Builds responses from dictionaries or with the
responsehelper. - Supports response status codes, content, headers, and cookies.
- Can be used to test libraries that use
requestsinternally.
Use Cases
- Python developers testing API clients can substitute mocked responses for live API calls.
- Library maintainers can test code that uses
requestswithout needing the external service to respond. - Teams can check how their code handles API errors by returning responses with chosen status codes and content.
- Developers can test cookie handling and response parsing with controlled headers and bodies.
What you need
Detected in the repository
- Python (from setup.py)
Getting Started
Install from PyPI:
pip install httmock
See the README for usage details.
License in Plain Words
No standard license was detected. Without a license, the default copyright rules apply: you may read the code, but not reuse it. Check the repository or ask the authors.
Alternatives
- HTTPretty: HTTPretty intercepts HTTP traffic at the socket level, while httmock targets requests-based HTTP interactions.
- python-mocket: Mocket intercepts socket and SSL traffic for multiple clients and protocols, while httmock focuses on the requests library.
- responses: Responses also mocks requests calls, with features such as callbacks and ordered responses; httmock provides conditional or catch-all mocks.
| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| httmock | Python | – | 471 | Inactive |
| HTTPretty | Python | MIT | 2.1k | Inactive |
| python-mocket | Python | BSD-3-Clause | 311 | Active |
| responses | Python | Apache-2.0 | 4.3k | Active |
Considerations
The repository is marked inactive, and there have been no commits in over a year or releases recorded in the past year. Although the project has multiple contributors and is not flagged as concentrated around one contributor, the supplied activity data shows no recent issue closures or merged pull requests. Check the code and your dependency requirements before relying on it. The license is reported as NOASSERTION, so review the repository's license files and confirm the terms before use. The README describes Python 2.7 and 3.4+ support, but the supplied project facts do not identify CI or tests.
Found this useful?
Share it with someone who would like httmock.