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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python_request_fanout-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad24fbde1309f710f4e1620ecdeb151e184e4a7225dc223c38e29f644933371d |
|
MD5 | 1a30b4beb27274fa6044f7e473a4baf8 |
|
BLAKE2b-256 | 82ab3c172fbb20567e90b1e715edab87967bf7b78b09b8184484e730287534ef |