Skip to main content

Next Gen. simple retrying for asyncio.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_retrying_ng-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

async_retrying_ng-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file async_retrying_ng-0.1.1.tar.gz.

File metadata

  • Download URL: async_retrying_ng-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.9.2 Linux/5.19.17-2-pve

File hashes

Hashes for async_retrying_ng-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b1d76ac15784ca1bc90bc1db5224b21243925f939d7d88ab5a9c8a1e369cb4f1
MD5 434c822ca287449daac014431f81a6e9
BLAKE2b-256 00ee14323082aa70c2181ec789d161ed859c004fd7a67d51c81b4898b9f29659

See more details on using hashes here.

File details

Details for the file async_retrying_ng-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for async_retrying_ng-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52cd52ce81b6a22b010ab9a183e5df6b3e4324a03c76fa92b3c3a8de546f3014
MD5 6210d3a342f3a35d9151e7d23eff5207
BLAKE2b-256 803db7e5ffde0960ad0c3e3791da0333eaf1db58ee8bca21e976311bde675264

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page