gana.utils.decorators

Contents

gana.utils.decorators#

Decorators for functions

Functions

once(func)

Ensures the function is executed only once

timer(logger[, kind, with_return, 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: str = None, with_return=True, level=20)[source]#

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