Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pylib-helpers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pylib-helpers

Helpers for common functional work done across several projects

  • 0.3.126
  • PyPI
  • Socket score

Maintainers
1

pylib-helpers

Helpers for logging, sleeping, and other common functional work done across projects

Release GitHub release (latest SemVer including pre-releases) PyPI

Build

Total alerts Language grade: Python

Conventional Commits

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc