Easy mode for Tenacity.
Project description
stamina
Tenacity is an amazing and beautifully composable toolkit for handling retries that I've been using it for years.
In practice, I've found myself to use only very few knobs and wished it wouldn't erase the types of the callables that I decorate with @tenacity.retry.
stamina is a very thin layer around Tenacity that I've been copy-pasting between my projects for a long time:
- Retry on certain exceptions (
retry_if_exception_type). - Wait exponentially with jitter (
wait_exponential_jitter). - Limit the number of retries and total time. (
stop_after_attemptandstop_after_delay). - Preserve type hints.
- Easy deactivation for testing.
If you need more sophisticated features, you probably should use Tenacity directly. Of course, it's possible that I'll add more features that I need.
License
stamina is written by Hynek Schlawack and distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stamina-22.1.0.tar.gz.
File metadata
- Download URL: stamina-22.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cca57885dbe6ae9385ad970dbe30ecece463d1a4b38c16781faec9f5fa8840f3
|
|
| MD5 |
ca3f6162f4c6b4aa139c775e62657bcd
|
|
| BLAKE2b-256 |
a163c83dafc42def74f59d87e53a71c13cad7423cd47bfdda7d3ea4911f1dc7d
|
File details
Details for the file stamina-22.1.0-py3-none-any.whl.
File metadata
- Download URL: stamina-22.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be328f6e76387cd22fa4b1fb2f61df5c3be37ec4badb188f1660152d78a22c16
|
|
| MD5 |
44950271fe6c41320bafdd55153514b2
|
|
| BLAKE2b-256 |
2c084a77500492bae6a2ecae3f32f28ef40e62984113f25386b4c9dd8856fc46
|