Skip to main content

A simple package for hitting multiple URLs and performing get requests in parallel.

Project description

request-boost

A simple package for hitting multiple URLs and performing get requests in parallel.

Current Status

Maintenance GitHub pages status GitHub up-time BOT Commits DependaBot

Issues Total Commits Contributors Forks Stars Watchers Branches

License: AGPL v3 made-with-python made-with-Markdown repo- size Followers

Setup

pip install request-boost

Important: Virtual Environment is recommended

Usage

# Sample data
number_of_sample_urls = 1000
urls = [ f'https://postman-echo.com/get?random_data={test_no}' for test_no in range(number_of_sample_urls) ]
headers = [{'sample_header':test_no} for test_no in range(number_of_sample_urls)]
from request_boost import boosted_requests

results = boosted_requests(urls=urls)
print(results)
from request_boost import boosted_requests

results = boosted_requests(urls=urls, no_workers=16, max_tries=5, timeout=5, headers=headers)
print(results)

Documentation

boosted_requests(urls, no_workers=8, max_tries=3, timeout=10, headers=None)

Get data from APIs in parallel by creating workers that process in the background
    :param urls: list of URLS
    :param no_workers: maximum number of parallel processes
    :param max_tries: Maximum number of tries before failing for a specific URL
    :param timeout: Waiting time per request
    :param headers: Headers if any for the URL requests
    :return: List of response for each API (order is maintained)

Credits

Maintained by

Kuldeep Singh Sidhu

Github: github/singhsidhukuldeep https://github.com/singhsidhukuldeep

Website: Kuldeep Singh Sidhu (Website) http://kuldeepsinghsidhu.com

LinkedIn: Kuldeep Singh Sidhu (LinkedIn) https://www.linkedin.com/in/singhsidhukuldeep/

Contributors

The full list of all the contributors is available here

website

Say Thanks

If this helped you in any way, it would be great if you could share it with others.

CHANGE LOG

0.1 (16/09/2021)

  • Released first version(stable) of request-boost.

Read more at https://github.com/singhsidhukuldeep/request-boost

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

request-boost-0.1.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file request-boost-0.1.tar.gz.

File metadata

  • Download URL: request-boost-0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for request-boost-0.1.tar.gz
Algorithm Hash digest
SHA256 129a96382797e6d07fdfd5dc7c3b191405018d45b73264ee17e4ebc5d8033a11
MD5 1b5588e036357ac03dd5a60852d67f9d
BLAKE2b-256 2afe64ffea85e00bedb8331043c4afd0c53c834d7b94c9789abed1e70da01770

See more details on using hashes here.

Supported by

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