{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"}],"enrichment":{"capability":"Intercepts and mocks HTTP requests made by the requests library, allowing you to test code that calls external APIs without making real network calls.","skillfed_tags":["testing","mocking","requests"],"use_cases":["Unit test code that calls third-party REST APIs without making real network requests.","Mock specific API endpoints conditionally using URL patterns to test error handling and edge cases.","Simulate API rate-limit responses or error codes to verify your application's retry logic.","Test libraries or frameworks that use requests internally by intercepting their HTTP calls.","Verify cookie handling and response headers in requests-based code without a live server."],"what_it_does":"httmock is a mocking library that intercepts HTTP requests made by the requests library, letting you replace real API calls with predefined mock responses during testing. It works by decorating handler functions with urlmatch (to conditionally mock specific URLs) or all_requests (to mock all requests), then wrapping your test code in an HTTMock context manager. The library lets you return simple dictionaries or use the response() method to construct full HTTP responses with status codes, headers, and cookies.\n\nThe package is straightforward and has low install friction\u2014it depends only on requests. However, it has been dormant since late 2020, with no active maintenance or updates. It remains functional for basic mocking tasks, but you should verify compatibility with your current Python and requests versions before relying on it in new projects.","worth_installing":"Yes, if you need basic HTTP mocking for requests-based code and your project is on stable Python and requests versions. The dormant maintenance status means no new features or bug fixes, so verify compatibility first. For new projects or active development, consider whether a more actively maintained alternative better suits your needs."},"id":"httmock","links":{"html":"https://skillfed.io/packages/httmock","md":"https://skillfed.io/packages/httmock.md","pypi":"https://pypi.org/project/httmock/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2020-10-28","license_spdx":null,"license_treatment":"permissive","name":"httmock","python_support":"unspecified","summary":"A mocking library for requests."},"popularity":{"monthly_downloads":1973040,"position":3393,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.4.0"}
