Parallel Requests

    HTTPX allows you to make HTTP requests in parallel in a highly efficient way,using async under the hood, while still presenting a standard threaded interface.

    This has the huge benefit of allowing you to efficiently make parallel HTTPrequests without having to switch out to using async all the way through.

    If we’re making lots of outgoing requests, we might not want to deal with theresponses sequentially, but rather deal with each response that comes backas soon as it’s available:

    The style of using blocks ensures that you’ll always have welldefined exception and cancellation behaviours. Request exceptions are only everraised when calling either or , and any pendingrequests are cancelled on exiting the block.

    If you’re working within an async framework, then you’ll want to use a fullyasync API for making requests.

    See the Async Client documentation for more details.