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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
glossy-0.0.2.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for glossy-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aa8e8fd3e47f0ac7e93b18a87f2a544e7fa949556c6554c14c81cd9c28e8302 |
|
MD5 | 89cc8c9571b62214e87d0ac5c6e70086 |
|
BLAKE2b-256 | e31db50565b141777a99c872fcf125fd9441e9703f89e4b8d79b0cb269766c72 |