niced_url_request
A simple wrapper class to "nice" url requests in python by setting a maximum frequency to url requests, and using a disk cache.
Motivation
I have needed several times lately to get some relatively large dataset from the net as a series of smaller http requests. This class is a convenient small wrapper for doing so without annoying the server.
Functionalities
- limit request rate
- cache the answers on disk
- perform up to 10 re-tries waiting 10 seconds in between if request fails to make querying large quantities of requests robust to minor network / service interruptions
Installation
pip install niced_url_request
Tests and example
To run tests: pytest -v . from the present folder.
For a detailed example: see examples folder.
Small start up example:
from niced_url_request import NicedUrlRequest
niced_requester = NicedUrlRequest()
request_result = niced_requester.perform_request("http://httpbin.org/get?bla1=blabla1")
print(request_result.decode("ASCII"))
Metadata
Release files for niced-url-request 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| niced_url_request-0.1.tar.gz | 5.4 kB | Without provenance | Details for niced_url_request-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| niced_url_request-0.1-py3-none-any.whl | Python 3 | none | any | Details for niced_url_request-0.1-py3-none-any.whl |
Total release size: 11.6 kB
Release files / niced_url_request-0.1.tar.gz
| Download URL | niced_url_request-0.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2cb6d61ec0226437c6848126adc481989fea279139760be58bec6a0abdae71d
|
|
BLAKE2b-256 checksum How to use checksums |
d5c2cda1d14f67eda46eab1509a403bc0ee671bbe5a4112d7b6cbb4fefdf3f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Release files / niced_url_request-0.1-py3-none-any.whl
| Download URL | niced_url_request-0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee8c670bbf8b4d25cbf99e3e57f3737b4c0efa799ea159fe9172b4e47da19276
|
|
BLAKE2b-256 checksum How to use checksums |
29a2ad957e30744afa6f8b8f4805547b8a15cceff0f19222804e13ac6d5fc155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Security for niced-url-request 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.