Skip to main content

make multiple requests concurrently and get their responses

Project description

It allows multiple requests to be made asynchronously.

This can be done.

pip3 install python-request-fanout

###Example:

import requests

from python_request_fanout.requester import HTTPMethod, Requester
request_array = [
    requests.Request(
        HTTPMethod.GET.name,
        url="https://www.google.com"
    ),
    requests.Request(
        HTTPMethod.GET.name,
        url="https://www.udemy.com"
    ),
    requests.Request(
        HTTPMethod.GET.name,
        url="https://www.youtube.com"
    ),
    requests.Request(
        HTTPMethod.POST.name,
        url="https://www.github.com"
    ),
]
response_array = Requester.do_requests(request_array)
assert len(response_array) == 4

Sample diagram

diagram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-request-fanout, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size python_request_fanout-1.0.1.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page