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

retrying-async

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retrying-async

Simple retrying for asyncio

  • 2.0.0
  • PyPI
  • Socket score

Maintainers
1

async_retrying

:info: Simple retrying for asyncio

Installation

.. code-block:: shell

pip install retrying-async==1.1.0 -i https://pypi.org/pypi

Usage

.. code-block:: python

import asyncio

from retrying_async import retry

counter = 0

@retry(attempts=3, delay=3)
async def fn():
    global counter

    counter += 1

    if counter == 1:
        raise RuntimeError

async def main():
    await fn()

loop = asyncio.get_event_loop()

loop.run_until_complete(main())

assert counter == 2

loop.close()

Python 3.5+ is required

Keywords

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