📦 CareHttp
CareHttp cares your data.
It wraps from Requests and Retrying, retry several times when you encounter requests error.
Installation
pip3 install carehttp
Usage
example1 print the url:
from carehttp import Carehttp
r = Carehttp().get(url='https://stackoverflow.com/', timeout=0.1)
print(r.text)
r = Carehttp().post('https://stackoverflow.com/', data={}, json={}, timeout=1)
print(r.text)
example2 print a title:
s = requests.Session()
r = Carehttp(session=s, mark='title').get('https://stackoverflow.com/', timeout=1)
print(r.text)
example3 custom retry setting:
r = Carehttp(mark='title', tries=10, delay=1, max_delay=60).get('https://stackoverflow.com/', timeout=1)
print(r.text)
How to use carehttp
- It's a combination from Requests and Retrying, only add a param mark
- Request part is exactly the same params with Requests.
- Retry part termed params. Usage more like Retry.
- If ignore mark, error displays the url, or else display the text of mark.
What else
- More functions is planning.
License
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
Metadata
Release files for carehttp 0.3.11
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 |
|---|---|---|---|---|
| carehttp-0.3.11.tar.gz | 6.9 kB | Without provenance | Details for carehttp-0.3.11.tar.gz |
Release files / carehttp-0.3.11.tar.gz
| Download URL | carehttp-0.3.11.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95913b376adcbe0966cc97b21721b4a4080d7a827e6f745ae48b951c21e8b037
|
|
BLAKE2b-256 checksum How to use checksums |
532a208fdcfb2e2c9ac83d326fb14f0e304795e081ee778ba89872dad2c01c0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for carehttp 0.3.11
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.