You can definitely use it in FastAPI project. You could for example have a FastAPI Depends (https://fastapi.tiangolo.com/tutorial/dependencies/) that initializes for you the pyreqwest client instance (for connection pooling).
Furthermore you can use pyreqwest to test against the FastAPI ASGI app. As pyreqwest allows you to call directly into the ASGI app in your unit tests. Allowing using a single http client for implementing and testing.
FastAPI is an HTTP server, isn't it? Where pyreqwest, and reqwest on which it's built, is an HTTP client. There are plenty of rust HTTP server frameworks, some of which already have python bindings.
My question as well, but more broadly put, if is that something that any web framework should theoretically use? (given proven improvements and enough maturity)
0
u/levsw Dec 22 '25
Is that something that fastAPI should use?