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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_retrying_ng-0.1.3.tar.gz
  • Upload date:
  • Size: 3.5 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.3.tar.gz
Algorithm Hash digest
SHA256 7b9c664945da471c8c2586820aaa0dccc6459506a4c7f8ab4f0e60e52cbc56ce
MD5 f0e83e6c5159dfe04b2069389d6fbd5f
BLAKE2b-256 63c3d6b4afb80a24b5ece2cb0d4ab270d273de8aa4bb542488c2687528ffaf8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: async_retrying_ng-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 59eb82206a8d8237ed21a64012a4a0d8752c0812e81418dad9abe7acc4d60f2a
MD5 323b36ffafedd6cfd17f1dc3a76d59af
BLAKE2b-256 9debcedde4619e759062d8463ae4d12237e425e0084e630d53c013ed1b1d615c

See more details on using hashes here.

Supported by

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