energia.utils.decorators

Contents

energia.utils.decorators#

Decorators for functions

Functions

once(func)

Ensures the function is executed only once

timer(logger[, kind, level])

Logs execution time and optionally shows a full computation using function arguments and result.

wraps(wrapped[, assigned, updated])

Decorator factory to apply update_wrapper() to a wrapper function

once(func)[source]#

Ensures the function is executed only once

timer(logger: Logger, kind=None, level=20)[source]#

Logs execution time and optionally shows a full computation using function arguments and result.