awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
getsentry avatar

getsentry/responses

0
View on GitHub↗
4,350 estrellas·368 forks·Python·Apache-2.0·2 vistas

Responses

Responses es una librería de mocking para Python diseñada para interceptar llamadas HTTP salientes realizadas con la librería Requests para devolver respuestas simuladas predefinidas. Funciona como un framework de verificación de solicitudes y una herramienta de simulación de red, permitiendo verificar el comportamiento de la aplicación frente a varios patrones de respuesta de API sin realizar llamadas de red reales.

El proyecto se distingue por un grabador de tráfico que captura interacciones de red reales y las guarda en archivos para su reproducción determinista. Además, permite la simulación de escenarios de red complejos, incluyendo la activación de tiempos de espera de conexión, errores de red y redirecciones HTTP.

La librería proporciona capacidades para la simulación dinámica de API mediante respuestas basadas en callbacks y colas de respuesta secuenciales para probar cambios de estado. Incluye herramientas para la verificación de datos de solicitudes y validación de atributos para garantizar que los encabezados, cuerpos y parámetros de consulta salientes cumplan con los criterios esperados.

Las configuraciones y registros de mocks se gestionan a través de decoradores y gestores de contexto para aislar comportamientos entre casos de prueba.

Features

  • API Request Mocking - Intercepts outgoing HTTP calls made with the Python Requests library to return predefined simulated responses.
  • HTTP Mock Servers - Intercepts outgoing requests to specific URLs and returns predefined status codes, headers, and bodies to simulate a server.
  • Traffic Serialization - Persists captured network responses to structured files on disk for offline playback.
  • Request Matching Engines - Uses a lookup table of URL patterns and HTTP methods to resolve incoming requests to simulated responses.
  • Module Monkey Patching - Replaces the internal request methods of the Requests library to divert traffic to a mock registry.
  • Python HTTP Mocking Libraries - Provides a specialized library for intercepting and mocking HTTP calls within Python applications using the Requests library.
  • API Response Recordings - Captures real API responses from a server and saves them to files for deterministic replay in tests.
  • API Integration Testing - Provides tools to verify that applications correctly send requests and handle various server responses using mock data.
  • API Simulation and Mocking - Implements flexible mock servers that generate different responses based on request bodies, headers, or sequences.
  • Request Verification - Includes a framework for asserting that outgoing requests contain the expected headers, bodies, and query parameters.
  • Mock Registry Management - Add, replace, or remove registered mock data dynamically during test execution to simulate different server scenarios.
  • Network Failure Simulations - Simulates network-level errors such as connection timeouts and failures to verify application resilience.
  • Sequential Response Queues - Maintains an ordered queue of responses for a single endpoint to simulate evolving server states.
  • Exception Simulation Utilities - Triggers specific Python exceptions instead of standard HTTP responses to test application error handling.
  • Predicate-Based Validations - Matches requests using custom logic and predicates applied to headers, bodies, and query parameters.
  • Context Managers - Implements Python decorators and context managers to isolate mock configurations and reset the registry between tests.
  • Dynamic Response Callbacks - Provides callback functions that generate mock HTTP responses based on incoming request data.
  • Response Sequencing - Returns a sequence of different responses for the same URL to test state changes and retry logic.
  • HTTP Traffic Recording - Captures real network interactions and saves them to files for deterministic replay in test suites.
  • Lifecycle Management - Provides automated handling of mock setup, teardown, and state resetting using decorators and context managers.
  • Network Request Assertions - Verifies that specific network requests were executed and tracks the number of times they were called.
  • Outgoing Request Validation - Validates that outgoing HTTP request bodies and headers match expected schemas or criteria.
  • Mocking and Fixtures - Utility for mocking the requests library.
  • Mocking Libraries - Utility for mocking network requests.
  • Testing Tools - Listed in the “Testing Tools” section of the Awesome Python awesome list.

Historial de estrellas

Gráfico del historial de estrellas de getsentry/responsesGráfico del historial de estrellas de getsentry/responses

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a Responses

Proyectos open-source similares, clasificados según cuántas características comparten con Responses.
  • pgte/nockAvatar de pgte

    pgte/nock

    13,108Ver en GitHub↗

    Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It functions as a network request interceptor and HTTP mock server, allowing developers to simulate external API behavior for automated testing without making live network calls. The project includes an API fixture recorder to capture real network interactions and save them as reusable data files for playback. It also features a network latency simulator that introduces artificial delays to outgoing HTTP responses to verify timeout handling and race conditions. The library prov

    JavaScript
    Ver en GitHub↗13,108
  • nock/nockAvatar de nock

    nock/nock

    13,103Ver en GitHub↗

    nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts and paths, returning predefined responses to decouple applications from external servers during automated testing. The project functions as an API expectation framework to verify that specific calls were made with correct parameters. It includes a traffic recorder that captures real network interactions as fixtures for playback and a network simulation tool to introduce artificial latency or trigger network errors. Its capabilities cover request matching via hostnames, paths

    JavaScripthttpjavascriptmock
    Ver en GitHub↗13,103
  • dreamhead/mocoAvatar de dreamhead

    dreamhead/moco

    4,446Ver en GitHub↗

    moco is a multi-protocol mock server and programmable API stub used to simulate HTTP, REST, WebSocket, and Server-Sent Events endpoints. It enables the creation of fake backend services to facilitate development and integration testing without requiring a live server. The project distinguishes itself through its ability to act as a network traffic replay tool, capturing real request-response pairs via a proxy and playing them back locally. It also supports bidirectional communication simulations, including WebSocket server simulation and SSE stream simulation with configurable delivery delays

    Java
    Ver en GitHub↗4,446
  • wheresrhys/fetch-mockAvatar de wheresrhys

    wheresrhys/fetch-mock

    1,310Ver en GitHub↗

    Fetch-mock is a testing utility designed to isolate application code from external network dependencies by intercepting and overriding outgoing traffic. It functions as a network request interceptor that captures calls made via the Fetch API, allowing developers to simulate server responses and verify application behavior without requiring a live backend infrastructure. The library distinguishes itself through a unified interface that provides consistent network interception logic across diverse runtime environments, including browsers, service workers, and server-side platforms. By replacing

    JavaScript
    Ver en GitHub↗1,310
Ver las 30 alternativas a Responses→

Preguntas frecuentes

¿Qué hace getsentry/responses?

Responses es una librería de mocking para Python diseñada para interceptar llamadas HTTP salientes realizadas con la librería Requests para devolver respuestas simuladas predefinidas. Funciona como un framework de verificación de solicitudes y una herramienta de simulación de red, permitiendo verificar el comportamiento de la aplicación frente a varios patrones de respuesta de API sin realizar llamadas de red reales.

¿Cuáles son las características principales de getsentry/responses?

Las características principales de getsentry/responses son: API Request Mocking, HTTP Mock Servers, Traffic Serialization, Request Matching Engines, Module Monkey Patching, Python HTTP Mocking Libraries, API Response Recordings, API Integration Testing.

¿Qué alternativas de código abierto existen para getsentry/responses?

Las alternativas de código abierto para getsentry/responses incluyen: pgte/nock — Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It… nock/nock — nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts… dreamhead/moco — moco is a multi-protocol mock server and programmable API stub used to simulate HTTP, REST, WebSocket, and Server-Sent… wheresrhys/fetch-mock — Fetch-mock is a testing utility designed to isolate application code from external network dependencies by… alisoftware/ohhttpstubs — OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing… bblimke/webmock — WebMock is a Ruby library for HTTP request stubbing, response simulation, and network interception. It serves as a…