iiapis
Compute backoff schedules as data, so you can print them, assert on them, and
hand them to a scheduler instead of hiding them inside sleep() calls.
Install
pip install iiapis
Usage
from iiapis import delay_for, delays
delays(5)
# [0.5, 1.0, 2.0, 4.0, 8.0]
delays(6, n_base=1, n_max=5)
# [1, 2, 4, 5, 5, 5]
delay_for(3) # 2.0
delays(3, n_jitter=0.2) # each value up to 20% below the raw delay
Jitter
Without jitter, every client that failed at the same moment retries at the same
moment — the failure becomes a thundering herd. n_jitter subtracts a random
fraction of each delay, spreading the retries out.
Set n_jitter=0 (the default) when you need deterministic output for tests or
documentation.
License
MIT
Metadata
Release files for iiapis 0.0.2
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 | |
|---|---|---|---|---|
| iiapis-0.0.2.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iiapis-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / iiapis-0.0.2.tar.gz
| Download URL | iiapis-0.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0c12b15b344d0d69da3fe6faf33ce649b6683bd0cfc304d7580303ded13adf3
|
|
BLAKE2b-256 checksum How to use checksums |
9b7aca327f1f13f678f42c8a4353f8ecde20d2ae5e373d24e09d285beec7b8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / iiapis-0.0.2-py3-none-any.whl
| Download URL | iiapis-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5fa24c9663bc029a508dfd45dabf9bfe8382684c8fbe05005ab3c4b9a5638eb
|
|
BLAKE2b-256 checksum How to use checksums |
6c8ac698caa2d6b74209b7cce1cd0b60e132d53d4e5157c862e08be834d11d28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for iiapis 0.0.2
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.