stouputils.decorators package#
This module provides decorators for various purposes:
@measure_time- Measure the execution time of a function and print it with the given print function@handle_error- Handle an error with different log levels@timeout- Raise an exception if the function runs longer than the specified timeout@retry- Retry a function when specific exceptions are raised, with configurable delay and max attempts@simple_cache- Easy cache function with parameter caching method@abstract- Mark a function as abstract, usingLogLevelsfor error handling@deprecated- Mark a function as deprecated, usingLogLevelsfor warning handling@silent- Make a function silent (disable stdout, and stderr if specified) (alternative tostouputils.ctx.Muffle)
Submodules#
- stouputils.decorators.abstraction module
- stouputils.decorators.caching module
- stouputils.decorators.common module
- stouputils.decorators.deprecation module
- stouputils.decorators.error_handling module
- stouputils.decorators.retrying module
- stouputils.decorators.silencing module
- stouputils.decorators.timeouts module
- stouputils.decorators.timing module