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.

Source Distribution

python_request_fanout-1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file python_request_fanout-1.0.1.tar.gz.

File metadata

  • Download URL: python_request_fanout-1.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.37.0 CPython/3.7.5

File hashes

Hashes for python_request_fanout-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ad24fbde1309f710f4e1620ecdeb151e184e4a7225dc223c38e29f644933371d
MD5 1a30b4beb27274fa6044f7e473a4baf8
BLAKE2b-256 82ab3c172fbb20567e90b1e715edab87967bf7b78b09b8184484e730287534ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page