Skip to main content

reqto

A wrapper around requests to tackle unstable timeout issues

Installation

Use the package manager pip to install reqto.

pip install reqto

Usage

import reqto
response = reqto.get(url,timeout=5,timeout_function=custom_function,timeout_args=custom_args)

Example

import reqto

def custom_function(parameter):
    print(parameter)

package="reqto"
response = reqto.get(f'https://pypi.org/pypi/{package}/json',timeout=5,timeout_function=custom_function,timeout_args="Timeout custom function called")
"""Will call timeout_function instead of raising an exception on Timeout"""
print(response)

response = reqto.get(f'https://pypi.org/pypi/{package}/json',timeout=1)
"""Will raise exception on Timeout"""
print(response)

Current scope

Done: GET, POST, PUT, DELETE, PATCH requests working fine with timeout

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Metadata

Release files for reqto 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reqto 0.1.7
File Size Uploaded
reqto-0.1.7.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reqto 0.1.7
File Interpreter ABI Platform
reqto-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / reqto-0.1.7.tar.gz

Download URL reqto-0.1.7.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
35bfebe5a7682ca087b9d98163138a5275c188d7866f96ca874eab4ca949b8b8
BLAKE2b-256 checksum
How to use checksums
41a50affa8e9f4b2d2afbbd4a9cf5527f42d33023a9ad14e8ca32794f21553c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / reqto-0.1.7-py3-none-any.whl

Download URL reqto-0.1.7-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b304e4fd19ab6dee46f18ff8e9f339f7f1d59a3c08a32d846b897b83e0ef9493
BLAKE2b-256 checksum
How to use checksums
eaf4876f64b52b924a9952d9fe6111c05494192258d9664df571fbb0a0f35f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page