Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Make your decorators glossy!

Project description


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

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 hashes
Filename, size glossy-0.0.3.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page