httpretty
HTTP request mock tool for Python testing.
- Status
- UnmaintainedNo commits in 1409 days.
- Last checked
- Checked · Oct 10, 2026
- License
- Open source
- Pricing
- Free tier · from $0
What it is
Httpretty is a Python library that allows developers to mock HTTP interactions in their tests. It's useful for isolating network-dependent code and ensuring consistent test results without relying on external services.
Httpretty stands out for its simplicity and ease of use in mocking HTTP responses, making it a go-to tool for Python developers looking to isolate their tests from external dependencies.
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 rely heavily on API interactions and require isolated test environments.
Look elsewhere if
Projects that do not involve network requests or external APIs.
Applications where real-time data is critical, as httpretty mocks the response.
Known weaknesses
Each one links to the public issue, changelog or docs page it came from, where we have one.
- 01
Limited language support
Httpretty is exclusively available for Python, limiting its utility in polyglot development environments.
- 02
Complex setup for certain use cases
Setting up Httpretty to work with complex HTTP interactions, such as streaming or chunked responses, can be cumbersome.
What it does well
Mock HTTP responses for testing purposes.
Supports various HTTP methods and headers.
Can be used with popular Python test frameworks.
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 httpretty
Setup steps, common gotchas and what to check after 30 days.