Helpers for common functional work done across several projects
Project description
pylib-helpers
Helpers for logging, sleeping, and other common functional work done across projects
RetryHandler
Samples can be found here in the tests
Example usage:
from somelib import ClientError
from helpers import Logger, RetryHandler, Sleeper
LOGGER = Logger()
SLEEPER = Sleeper()
def _client_error(err_obj):
err_msg = str(err_obj)
if "Recoverable" not in err_msg:
raise err_obj
else:
LOGGER.print_error(err_msg)
SLEEPER.normal_sleep()
@RetryHandler(
(ClientError),
max_retries=10,
wait_time=0,
err_callbacks={"ClientError": (_client_error, {})},
).wrap
def do_the_thing(data):
pass
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
pylib-helpers-0.3.126.tar.gz
(16.8 kB
view details)
Built Distribution
File details
Details for the file pylib-helpers-0.3.126.tar.gz
.
File metadata
- Download URL: pylib-helpers-0.3.126.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfef3f47e61a85a8dc4999b819104f55f88dd1bc5e300a763ec8f2ef2a9bba3e |
|
MD5 | e76ef5766cd9c8439269800458e53426 |
|
BLAKE2b-256 | f6899c07d13fb677057d06fa7d92bfe59c7df10c942c81e24d77f0513e1394d5 |
File details
Details for the file pylib_helpers-0.3.126-py3-none-any.whl
.
File metadata
- Download URL: pylib_helpers-0.3.126-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e635905ef75c83ed473f6a08940efd2a87ad5de9303c9387e71805d124b7106 |
|
MD5 | bc2b1f347fafc46fe53b945afbf7c595 |
|
BLAKE2b-256 | ba62fa68150a4ae2e28bf6799cb865eb2aee96c79bee2c189c5d8002d95021c4 |