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 details)
Built Distribution
File details
Details for the file glossy-0.0.3.tar.gz
.
File metadata
- Download URL: glossy-0.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b7581354e42ab8bfc4c6dad1453eda342c6b412069e589f84077e32b143848 |
|
MD5 | be547fece990529ab701e8a4131d5eb9 |
|
BLAKE2b-256 | 8f862e1443dc19ed941cb1af241760476c2de82932e4bce9fe994b1f6a49900c |
File details
Details for the file glossy-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: glossy-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09492fca57ba33093542f8ebec22815fa0662312bd23100c1c48465ee445dd8a |
|
MD5 | e20aba649002fe94bf773d5fe45adabe |
|
BLAKE2b-256 | e0bdfcdee24b5630e433ad435d7597cac09955437ec5030ca35f0418ca31917a |