NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #709 most downloaded on PyPI
A utility for mocking out the Python HTTPX and HTTP Core libraries.
Last release 5 months ago
08 Apr 2026
Release timing varies
gaps range from 8 days to 1.3 years
Nearly every release is documented
notes for 47 of 47 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
48 releases · first in 2019
Fix regression causing params pattern to stop working under some conditions, by doing a strict detection of ANY in multi items patterns
params pattern to stop working under some conditions,
by doing a strict detection of ANY in multi items patterns (#313)Fix data pattern with list value
data pattern with list value (#264)// in URL path by not using urljoin when
prepending path, thanks @lewiscollard and @Skeen (#302)Any to align with HTTPX, thanks @JacobHayes (#284)ANY in MuitiItems patterns (#289)One column per quarter.
Support HTTPX 0.28.0, thanks @ndhansen
Fix files pattern not handling str and BytesIO, thanks @pierremonico for input
files pattern not handling str and BytesIO, thanks @pierremonico for input (#260)None values in data pattern, thanks @slingshotvfx for issue (#259)Fix matching request data when files are provided, thanks @ziima for input
Better assertion output for assert_all_called, thanks @sileht
assert_all_called, thanks @sileht (#224)CONTRIBUTING.md, thanks @morenoh149 (#238)Router.assert_all_called(), thanks @BeyondEvil for input (#241)Support HTTPX 0.23.1, thanks @g-as for input
Type Router.__getitem__ to not return optional routes, thanks @flaeppe
Router.__getitem__ to not return optional routes, thanks @flaeppe (#216)Call.response to raise instead of returning optional response (#217)CallList.last to raise instead of return optional call (#217)M() to not return optional pattern, by introducing a Noop pattern (#217)Route.pattern to not be optional (#217)mypy on both tests and respx (#217)Call.has_response helper, now that .response raises (#217)Fix typing for Route modulos arg
Better cleanup before building egg, thanks @nebularazer
Allow first path segments containing colons, thanks @hannseman.
Use Session.notify when chaining nox sessions, thanks @flaeppe.
Include extensions when instantiating request in HTTPCoreMocker
Raise custom error types for assertion checks.
Downgrade HTTPX requirement to 0.20.0.
HTTPX requirement to 0.20.0. (#170)Deprecate RESPX MockTransport in favour of HTTPX MockTransport.
Implement support for async side effects in router.
Require HTTPX 0.18.0 and implement the new transport API. (PR #142)
HTTPX 0.18.0 and implement the new transport API. (PR #142)route.return_value, thanks @tzing. (PR #133)Fixed decorator respx_mock kwarg, mistreated as a pytest fixture. (PR #117)
respx_mock kwarg, mistreated as a pytest fixture. (PR #117)JSON pattern sometimes causing a JSONDecodeError. (PR #124)RouteList from Router. (PR #120)Mocker implementations and their using name. (PR #121)HTTPXMocker, optionally patching HTTPX. (PR #122)Easier support for using HTTPX MockTransport. (PR #118)
method__in and scheme__in pattern lookups. (PR #113)MockTransport. (PR #112)Deprecated old MockTransport in favour of respx.mock(...). (PR #109)
url pattern with support for HTTPX proxy url format. (PR #110)host pattern with support for regex lookup. (PR #110)respx.request(...). (PR #111)MockTransport in favour of respx.mock(...). (PR #109)MockTransport in MockRouter, instead of extending. (PR #109)HTTPXMock, for transport patching, from MockRouter. (PR #109)Dropped all deprecated APIs and models, see 0.15.0 Changed section. (PR #105)
One year since first release, yay!
0.15.0 Changed section. (PR #105)Snapshot routes and mocks when starting router, rollback when stopping. (PR #102)
Deprecated mixing of request pattern and response details in all API's. (PR #96)
respx.route(...) with enhanced request pattern matching. (PR #96)httpx.Response and MockResponse. (PR #96).respond(...) response details. (PR #96).pass_through(). (PR #96)headers and cookies patterns. (PR #99)contains and in lookups. (PR #99).mock(...) in favour of callbacks. (PR #101).return_value and .side_effect setters. (PR #101)respx.add in favour of method=. (PR #96)alias=... in favour of name=... when adding routes. (PR #96)respx.aliases in favour of respx.routes. (PR #96)RequestPattern in favour of Route. (PR #96)ResponseTemplate in favour of MockResponse. (PR #96)pass_through= in HTTP method API's (PR #96)response arg in side effects (callbacks). (PR #97)base_url. (PR #96)async side effects (callbacks). (PR #97)Deprecated respx.stats in favour of respx.calls, thanks @SlavaSkvortsov. (PR #92)
text, html and json content shorthands to ResponseTemplate. (PR #82)text, html and json content shorthands to high level API. (PR #93)http_version for a mocked response. (PR #82)params to align with HTTPX API, thanks @jocke-l. (PR #81)ResponseTemplate.content as proper getter, i.e. no resolve/encode to bytes. (PR #82)respx.stats in favour of respx.calls, thanks @SlavaSkvortsov. (PR #92)Content-Type: text/plain header. (PR #82)Dropped deprecated HTTPXMock in favour of MockTransport.
HTTPX 0.15. (PR #77)respx.pop api, thanks @paulineribeyre. (PR #72)HTTPXMock in favour of MockTransport.respx.request in favour of respx.add.HTTPX max version requirement in setup.py.Fixed non-iterable pass-through responses. (PR #68)
Dropped no longer needed asynctest dependency, in favour of built-in mock. (PR #69)
asynctest dependency, in favour of built-in mock. (PR #69)Fixed support for HTTPX 0.14.0. (PR #45)
HTTPX 0.14.0. (PR #45)Added support for pop'ing a request pattern by alias, thanks @radeklat. (PR #60)
Fixed mocking HTTPX clients instantiated with proxies. (PR #58)
HTTPX clients instantiated with proxies. (PR #58)Renamed HTTPXMock to MockTransport, but kept a deprecated HTTPXMock subclass.
HTTPX 0.13. (PR #57)HTTP Core.HTTPX clients without patching.httpx_mock to respx_mock.HTTPXMock to MockTransport, but kept a deprecated HTTPXMock subclass.respx.request() in favour of respx.add().Fixed support for HTTPX 0.12.0. (PR #45)
HTTPX 0.12.0. (PR #45)Refactored high level and internal api for better editor autocompletion. (PR #44)
Fixed usage of nested or parallel mock instances. (PR #39)
Fixed support for HTTPX 0.11.0 sync api. (PR #38)
HTTPX 0.11.0 sync api. (PR #38)Renamed refactored httpx internals. (PR #37)
Added support for configuring patterns base_url. (PR #34)
base_url. (PR #34)py.typed files.HTTPX 0.9.3 refactorizations. (PR #35)Added documentation built with mkdocs. (PR #30)
mkdocs. (PR #30)HTTPX version 0.8+. (PR #32)respx.mock module to respx.api. (PR #29)nox. (PR #31)Allowing assertions to be configured through decorator and context manager. (PR #28)
Allows mock decorator to be used as sync or async context manager. (PR #27)
mock decorator to be used as sync or async context manager. (PR #27)Added stats to high level API and patterns, along with call_count. (PR #25)
stats to high level API and patterns, along with call_count. (PR #25)Fixed responses in call stats when using synchronous HTTPX client. (PR #23)
HTTPX client. (PR #23)Added support for pass_through patterns. (PR #20)
pass_through patterns. (PR #20)assert_all_mocked feature and setting. (PR #21)HTTPX requests to be mocked.Renamed activate decorator to mock. (PR #15)
activate decorator to mock. (PR #15)Added assert_all_called feature and setting. (PR #14)
assert_all_called feature and setting. (PR #14)Renamed python package to respx. (PR #12)
respx. (PR #12)add() to request() and added HTTP method shorthands. (PR #13)### Changed - Renamed PyPI package to respx.
respx.Your coding agent can read these notes before it upgrades. Set up the MCP server →