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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| reqto-0.1.7.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|