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.3.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for glossy-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09492fca57ba33093542f8ebec22815fa0662312bd23100c1c48465ee445dd8a |
|
MD5 | e20aba649002fe94bf773d5fe45adabe |
|
BLAKE2b-256 | e0bdfcdee24b5630e433ad435d7597cac09955437ec5030ca35f0418ca31917a |