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.abstract module
- stouputils.decorators.common module
- stouputils.decorators.deprecated module
- stouputils.decorators.handle_error module
- stouputils.decorators.measure_time module
- stouputils.decorators.retry module
- stouputils.decorators.silent module
- stouputils.decorators.simple_cache module
- stouputils.decorators.timeout module