glossy

Make your decorators glossy!


Keywords
decorator, decorators, test, testing, mock, mocks, stub, stubs, stubbing, util, utils, utility, utilities, helpers, tools, wrappers
License
MIT
Install
pip install glossy==0.0.3

Documentation


Installation

pip install glossy

Start Decorating

import glossy
import time


@glossy.decorator
def timer(func, *args, **kwargs):
    """
    Timer

    Place this decorator on functions to see how long
    they take to execute.
    """
    start = time.time()
    result = func(*args, **kwargs)
    secs = time.time() - start
    name = func.__name__
    print(f"Function {name} took {secs} seconds")
    return result

Features