Metadata-Version: 2.1
Name: exception-handler-plus
Version: 0.1.0
Summary: Simple Exception Handler Decorator
Home-page: 
Author: Sergei Sazonov
Author-email: sspytdev@gmail.com
License: MIT
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

Exception Handler decorator allows developers to specify specific exception types
to handle and provide a handler function for each of those exception
types. The decorator also provides an option to specify a default
return value to be used when an unhandled exception occurs. 
Additionally, the decorator tracks the number of times each 
exception type has been seen and raises a MaxRepeatedExceptionsError
when a specific exception type exceeds a specified maximum number of
occurrences.

The decorator uses the exception_handler function as a wrapper 
for the decorated function. The function accepts four parameters:

- handlers (Dict[Type[Exception], HandlerFuncType]): A dictionary 
where the keys are exception types and the values are the corresponding
- handler functions for those exception types.
- default_return (Optional[Any]): A default return value to be 
used when an unhandled exception occurs.
- max_repeated_exceptions (int): The maximum number of times an 
exception type can be seen before a MaxRepeatedExceptionsError is 
raised.
- seen_exceptions (Optional[DefaultDict[Type[Exception], List[int]]]): 
A defaultdict used to keep track of the number of times each 
exception type has been seen.


The read_env module is used to read the maximum number of repeated 
exceptions that can occur from an environment variable.
