Socket
Book a DemoInstallSign in
Socket

async-retrying-ng

Package Overview
Maintainers
1
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Source code not available
We could not scan this package. Some page functionalities have been disabled

async-retrying-ng

Next Gen. simple retrying for asyncio.

pipPyPI
Metadata Only
Version
0.1.3
Maintainers
1

async_retrying

Next Gen. simple retrying for asyncio - fork/fix from https://GitHub.com/hellysmile/async_retrying but updated for Python 3.10+ only

Installation

shell

pip install async_retrying_ng

Usage

python

    import asyncio

    from async_retrying_ng import retry

    counter = 0

    @retry
    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.10+ is required

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