# getsentry/responses

A utility for mocking out the Python Requests library.

Repository: https://github.com/getsentry/responses
Canonical: https://ross.abutalabs.com/products/responses
Language: Python
License: Apache-2.0
License Family: permissive
Topics: tag-production
Last push: 2026-08-26T19:17:35+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 4674, "days_push": 7, "days_rel": 7, "gap_med": 56, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4345, forks 374 (observed 2026-08-28T04:08:46.166214+00:00)

## What it is
A Python library for mocking out the `requests` HTTP library in tests. It lets you register fake responses with matching on method, URL, headers, and body via a decorator-based API.

## Use cases
- mock http requests in python unit tests
- fake responses for the requests library
- test code that calls external apis without network
- simulate http error responses like 404 or 500 in tests
- match request bodies and query params in mocked requests
- pytest fixture for mocking requests

## When to choose
- your code uses the requests library and you need deterministic tests
- you want to simulate api failures, status codes, and payloads without a real server
- you need fine-grained request matching (headers,  bodies, query params)

## When to avoid
- your code uses httpx or aiohttp instead of requests
- you need integration tests against real or spun-up servers
- you need mocking for async http clients

## Facets
- artifact type: library
- maturity: active
- function: mocking, testing, http-client
- domain: testing, developer-tools, apis
- platform: python, cross-platform
- tags: requests-mock, http-mocking, unit-testing, pytest

## Member repositories
- getsentry/responses (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.166214+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:35.075875+00:00, confidence not recorded.
  - readme: https://github.com/getsentry/responses (fetched 2026-08-28T04:08:46.166214+00:00, sha eca1d27bf7b6)
  - registry_pypi: https://pypi.org/pypi/responses/json (fetched 2026-08-29T09:10:34.783760+00:00, sha b52fdf232f7f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
