Best way to run parallel async http requests

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • grequests

    Requests + Gevent = <3

  • I found examples of running parallel async http requests using grequests, but in its GitHub page it recommends using requests-threads or requests-futures instead. Which of them would be the most straightforward tool for optimizing a sequence of GET requests against an API. Case scenario: API endpoint provides paginated responses. With first response, I get the total of itens, which allow me to prepare all the remaining urls. The API allows for 25 simultaneous requests from a single user session (JWT token).

  • requests-threads

    🎭 Twisted Deferred Thread backend for Requests.

  • I found examples of running parallel async http requests using grequests, but in its GitHub page it recommends using requests-threads or requests-futures instead. Which of them would be the most straightforward tool for optimizing a sequence of GET requests against an API. Case scenario: API endpoint provides paginated responses. With first response, I get the total of itens, which allow me to prepare all the remaining urls. The API allows for 25 simultaneous requests from a single user session (JWT token).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • requests-futures

    Asynchronous Python HTTP Requests for Humans using Futures

  • I found examples of running parallel async http requests using grequests, but in its GitHub page it recommends using requests-threads or requests-futures instead. Which of them would be the most straightforward tool for optimizing a sequence of GET requests against an API. Case scenario: API endpoint provides paginated responses. With first response, I get the total of itens, which allow me to prepare all the remaining urls. The API allows for 25 simultaneous requests from a single user session (JWT token).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts