Skip to main content

retry-decorator

A retry python decorator to handle a given set of errors and to retry the decorated function n times if error is in set of errors

Installation

pip install retry-decorator

how to use

Here is an exemple on how to use the decorator

from RetryDecorator import retry

@retry(n_retry=2, tts=0.1)
def func_to_retry(raise_error: bool = True):
    if raise_error:
        print("error is raised")
        
        raise Exception("test exception")
    
    print("error not raised")

    return True

def exemple():
    try:
        func_to_retry()

    except Exception as e:
        print(e)

    func_to_retry(False)

    return

exemple()

Metadata

Release files for retry-decorator-mt 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retry-decorator-mt 1.0.1
File Size Uploaded Provenance
retry_decorator_mt-1.0.1.tar.gz 3.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for retry-decorator-mt 1.0.1
File Interpreter ABI Platform
retry_decorator_mt-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / retry_decorator_mt-1.0.1.tar.gz

Download URL retry_decorator_mt-1.0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
20e4094c05cd16aee80061215cf7d33b9df5725c2c5915756f8b0afd9220ddff
BLAKE2b-256 checksum
How to use checksums
675d53cf6edd519c56d17d6cd4caed5507a1453382c5fc0489c4b7e044283a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2025.

Transparency log

Release files / retry_decorator_mt-1.0.1-py3-none-any.whl

Download URL retry_decorator_mt-1.0.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d3e55f3c5e63a69cedcf8f74c74ad5dac8a5b3177fd91797a70166df8b37bb6
BLAKE2b-256 checksum
How to use checksums
4478771c5413a7adcc32d49cc457f68cdd2ae0b63f39c74e61bcb78ac7a7e321
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2025.

Transparency log

Security for retry-decorator-mt 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for retry_decorator_mt-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page