awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
getsentry avatar

getsentry/responses

0
View on GitHub↗
4,350 stele·368 fork-uri·Python·Apache-2.0·2 vizualizări

Responses

Responses este o bibliotecă de mocking Python concepută pentru a intercepta apelurile HTTP de ieșire efectuate cu biblioteca Requests pentru a returna răspunsuri simulate predefinite. Funcționează ca un framework de verificare a cererilor și un instrument de simulare a rețelei, permițând verificarea comportamentului aplicației față de diverse modele de răspuns API fără a efectua apeluri de rețea reale.

Proiectul se distinge printr-un recorder de trafic care capturează interacțiunile reale de rețea și le salvează în fișiere pentru reluare deterministă. Permite, de asemenea, simularea unor scenarii complexe de rețea, inclusiv declanșarea timeout-urilor de conexiune, erorilor de rețea și redirecționărilor HTTP.

Biblioteca oferă capabilități pentru simularea API dinamică folosind răspunsuri bazate pe callback și cozi de răspuns secvențiale pentru a testa schimbările de stare. Include instrumente pentru verificarea datelor cererii și validarea atributelor pentru a se asigura că header-ele, corpurile și parametrii de interogare de ieșire îndeplinesc criteriile așteptate.

Configurațiile și registrele de mock sunt gestionate prin decoratori și context managers pentru a izola comportamentele între cazurile de testare.

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.

Istoric stele

Graficul istoricului de stele pentru getsentry/responsesGraficul istoricului de stele pentru getsentry/responses

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Alternative open-source pentru Responses

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Responses.
  • pgte/nockAvatar pgte

    pgte/nock

    13,108Vezi pe 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
    Vezi pe GitHub↗13,108
  • nock/nockAvatar nock

    nock/nock

    13,103Vezi pe 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
    Vezi pe GitHub↗13,103
  • dreamhead/mocoAvatar dreamhead

    dreamhead/moco

    4,446Vezi pe 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
    Vezi pe GitHub↗4,446
  • wheresrhys/fetch-mockAvatar wheresrhys

    wheresrhys/fetch-mock

    1,310Vezi pe 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
    Vezi pe GitHub↗1,310
Vezi toate cele 30 alternative pentru Responses→

Întrebări frecvente

Ce face getsentry/responses?

Responses este o bibliotecă de mocking Python concepută pentru a intercepta apelurile HTTP de ieșire efectuate cu biblioteca Requests pentru a returna răspunsuri simulate predefinite. Funcționează ca un framework de verificare a cererilor și un instrument de simulare a rețelei, permițând verificarea comportamentului aplicației față de diverse modele de răspuns API fără a efectua apeluri de rețea reale.

Care sunt principalele funcționalități ale getsentry/responses?

Principalele funcționalități ale getsentry/responses sunt: API Request Mocking, HTTP Mock Servers, Traffic Serialization, Request Matching Engines, Module Monkey Patching, Python HTTP Mocking Libraries, API Response Recordings, API Integration Testing.

Care sunt câteva alternative open-source pentru getsentry/responses?

Alternativele open-source pentru getsentry/responses includ: 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…