Metadata-Version: 2.4
Name: retry-decorator-mt
Version: 1.0.0
Summary: Decorator to allow for retry of th decorated object if a given exception is raised
Author-email: Vincent Martel <vincent.martel.11235@gmail.com>
License: MIT
Keywords: decorator,utilities,retry,error handling,timeout,error,quality of life
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file

# 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()
``` 
