Skip to main content

Python's requests with custom configuration

Project description

Module to work with custom requests capabilities.

Current capabilities configured:

  • Custom timeout for all requests.
  • Raise exception with certain HTTP status code responses.
  • Retry on failure.

Installation

pip install requests_custom

How to use

from requests_custom import requests_custom
requests = requests_custom.RequestsCustom(debug_full = True).get_requests()
requests.get('https://duckduckgo.com')

References

https://findwork.dev/blog/advanced-usage-python-requests-timeouts-retries-hooks/

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

requests_custom-0.0.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

requests_custom-0.0.3-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

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