httpretty

HTTP request mock tool for Python testing.

DecliningOpen SourceLow lock-in

Pricing

Free tier

Flat rate

Adoption

Cooling

License

Open Source

Data freshness

Aging · Jun 8, 2026

Overview

What is httpretty?

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.

Key differentiator

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.

Capability profile

Capability Radar

Ease of StartEcosystemValueMaturityFlexibilityScale Ready

Honest assessment

Strengths & Weaknesses

↑ Strengths

Mock HTTP responses for testing purposes.medium

Supports various HTTP methods and headers.medium

Can be used with popular Python test frameworks.medium

↓ Weaknesses

Limited language supporthigh

Httpretty is exclusively available for Python, limiting its utility in polyglot development environments.

Poor documentationmedium

The official documentation lacks comprehensive examples and detailed explanations of advanced features.

Complex setup for certain use caseslow

Setting up Httpretty to work with complex HTTP interactions, such as streaming or chunked responses, can be cumbersome.

Fit analysis

Who is it for?

✓ Best 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.

✕ Not a fit for

Projects that do not involve network requests or external APIs.

Applications where real-time data is critical, as httpretty mocks the response.

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

Next step

Get Started with httpretty

Step-by-step setup guide with code examples and common gotchas.

View Setup Guide →