awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
getsentry avatar

getsentry/responses

0
View on GitHub↗
4,350 Stars·368 Forks·Python·Apache-2.0·3 Aufrufe

Responses

Responses ist eine Python-Mocking-Bibliothek, die darauf ausgelegt ist, ausgehende HTTP-Aufrufe, die mit der Requests-Bibliothek getätigt werden, abzufangen, um vordefinierte simulierte Antworten zurückzugeben. Sie fungiert als Framework zur Request-Verifizierung und als Netzwerksimulationstool, das die Überprüfung des Anwendungsverhaltens gegenüber verschiedenen API-Antwortmustern ermöglicht, ohne echte Netzwerkaufrufe zu tätigen.

Das Projekt zeichnet sich durch einen Traffic-Recorder aus, der echte Netzwerkinteraktionen erfasst und zur deterministischen Wiedergabe in Dateien speichert. Es ermöglicht zudem die Simulation komplexer Netzwerkszenarien, einschließlich des Auslösens von Verbindungs-Timeouts, Netzwerkfehlern und HTTP-Weiterleitungen.

Die Bibliothek bietet Funktionen für dynamische API-Simulation mittels Callback-gesteuerter Antworten und sequenzieller Antwort-Queues, um Zustandsänderungen zu testen. Sie enthält Tools zur Verifizierung von Request-Daten und Attributvalidierung, um sicherzustellen, dass ausgehende Header, Bodies und Query-Parameter den erwarteten Kriterien entsprechen.

Mock-Konfigurationen und Registries werden über Dekoratoren und Context-Manager verwaltet, um Verhaltensweisen zwischen Testfällen zu isolieren.

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.

Star-Verlauf

Star-Verlauf für getsentry/responsesStar-Verlauf für getsentry/responses

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Häufig gestellte Fragen

Was macht getsentry/responses?

Responses ist eine Python-Mocking-Bibliothek, die darauf ausgelegt ist, ausgehende HTTP-Aufrufe, die mit der Requests-Bibliothek getätigt werden, abzufangen, um vordefinierte simulierte Antworten zurückzugeben. Sie fungiert als Framework zur Request-Verifizierung und als Netzwerksimulationstool, das die Überprüfung des Anwendungsverhaltens gegenüber verschiedenen API-Antwortmustern ermöglicht, ohne echte Netzwerkaufrufe zu tätigen.

Was sind die Hauptfunktionen von getsentry/responses?

Die Hauptfunktionen von getsentry/responses sind: API Request Mocking, HTTP Mock Servers, Traffic Serialization, Request Matching Engines, Module Monkey Patching, Python HTTP Mocking Libraries, API Response Recordings, API Integration Testing.

Welche Open-Source-Alternativen gibt es zu getsentry/responses?

Open-Source-Alternativen zu getsentry/responses sind unter anderem: 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…

Open-Source-Alternativen zu Responses

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Responses.
  • pgte/nockAvatar von pgte

    pgte/nock

    13,108Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗13,108
  • nock/nockAvatar von nock

    nock/nock

    13,103Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗13,103
  • dreamhead/mocoAvatar von dreamhead

    dreamhead/moco

    4,446Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗4,446
  • wheresrhys/fetch-mockAvatar von wheresrhys

    wheresrhys/fetch-mock

    1,310Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗1,310
Alle 30 Alternativen zu Responses anzeigen→