$npx skillfedfor your agent

responses

A utility library for mocking out the `requests` Python library.

Worth itPyPI Software DevelopmentReleased Jul 202671.5M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — responses-0.26.2-py3-none-any.whl
v0.26.2 · released 2026-07-03 · Python >=3.8 · 3 runtime deps: requests, urllib3, pyyaml

Yes. Responses is a mature, actively maintained testing utility with no security vulnerabilities, low install friction, and permissive licensing. It's a standard choice for testing code that uses requests, and its decorator and context-manager interfaces integrate cleanly into existing test suites. Install it if you write tests for code that makes HTTP calls.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires requests >= 2.30.0 and Python 3.8 or newer.
  • Low friction install with no compiled dependencies.
  • Actively maintained as of 2026-07-03, with recent activity and 4344 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.

last release 2026-07-03 (42 days) · last repo commit 2026-07-24 · 4,344 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 71,526,828 downloads/mo, #464 on PyPI

Verify before relying

pip install responses

import responses
import requests

@responses.activate
def test_api():
    responses.get('http://example.com/api', json={'key': 'value'})
    resp = requests.get('http://example.com/api')
    assert resp.json() == {'key': 'value'}
  • Whether the package supports async/await patterns or only synchronous requests mocking.
  • Performance characteristics when mocking a large number of endpoints in a single test.
Same gist for agents: .md · .json

What it is and what it does

Responses is a mocking library that intercepts calls made by the requests library, allowing you to define mock responses for specific URLs and HTTP methods without making real network calls. It works by registering expected responses before your test runs, then raising a ConnectionError if your code tries to hit an unmocked URL—ensuring your tests only exercise the paths you've explicitly defined.

You can register mocks using a decorator, context manager, or direct API calls, and match requests based on method, URL, query parameters, request body, headers, and other attributes. The library includes built-in matchers for JSON and URL-encoded bodies, and supports custom matchers for more complex scenarios. It's designed for unit testing code that depends on external HTTP services, letting you verify your code's behavior without network access or external service availability.

Use it for

  • Unit test code that calls third-party REST APIs without requiring network access or API credentials.
  • Verify your application sends the correct HTTP method, headers, and body to an external service.
  • Test error handling by mocking different HTTP status codes and error responses.
  • Isolate tests from external service outages or rate limits by replacing real calls with deterministic mocks.
  • Test multiple code paths by registering different responses for the same URL based on request attributes.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Responses is a mature, actively maintained testing utility with no security vulnerabilities, low install friction, and permissive licensing. It's a standard choice for testing code that uses requests, and its decorator and context-manager interfaces integrate cleanly into existing test suites. Install it if you write tests for code that makes HTTP calls.

Install

responses on PyPI

Before you install

Low friction install with no compiled dependencies. Actively maintained as of 2026-07-03, with recent activity and 4344 repository stars. Requires requests >= 2.30.0 and Python 3.8 or newer.

Requires requests >= 2.30.0 and Python 3.8 or newer.

License in practice

Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.

Quickstart

pip install responses

import responses
import requests

@responses.activate
def test_api():
    responses.get('http://example.com/api', json={'key': 'value'})
    resp = requests.get('http://example.com/api')
    assert resp.json() == {'key': 'value'}

Verify before relying

  • Whether the package supports async/await patterns or only synchronous requests mocking.
  • Performance characteristics when mocking a large number of endpoints in a single test.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
requestsurllib3pyyaml
MaintenanceActively maintained 42 days since the last release
Last repo commit
First released
Downloads71,526,828 / month, #464 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

Evidence: responses-0.26.2-py3-none-any.whl

Tags

Capabilities
mock requests libraryhttp request mockingtest api calls without networkrequests library testingintercept http requestsfake api responsesunit test external apis
Topics
testingmockinghttp

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “test api calls without network”

  • responsesMocks HTTP requests made by the requests library, allowing you to…
  • httmockIntercepts and mocks HTTP requests made by the requests library,…
  • betamaxBetamax records and replays HTTP interactions made through the…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also pytest-responses · requests-mock · urllib3-mock · pook · httmock · aioresponses · mocket · aresponses · aiointercept · pytest_httpserver