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.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distributions

async_retrying_ng-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

async_retrying_ng-0.1.0-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: async_retrying_ng-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 283dbdeacce27224b5599abfa2eb195b3ea6340960ade496e38685548efbdeca
MD5 985b69d6d902f32590c9fcf40c84be6b
BLAKE2b-256 a5943d9b56bef5baf8edf6a5355f927014d9c6187fedc7a0ed8d36ea656ab7a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_retrying_ng-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27d0aeda1e4e9756c4140fe09502c6982a335c86cf81b78e4b187191bb32719a
MD5 2e357410764ac9c4188b7bbe5001303a
BLAKE2b-256 ac530671b567be8470e2b2d8371b1ead9c3617b79a68f2bc83dbec9d894f3201

See more details on using hashes here.

File details

Details for the file async_retrying_ng-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for async_retrying_ng-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8136c635e9155a445e83b417a4bd4a6eeb0cfda3500bb1463ac5ad8ae4f36def
MD5 b0a44485f7687f7e3267a9a32518b772
BLAKE2b-256 8622445fe366ae87d211c65b97c9562911568136f087a21884b4ee81458d01e1

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