Skip to main content

Make your decorators glossy!

Project description


pip install glossy

Start Decorating

import glossy
import time

def timer(func, *args, **kwargs):

    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


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for glossy, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size glossy-0.0.3-py2.py3-none-any.whl (7.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size glossy-0.0.3.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page