some decorators
Project description
This repo hosts 3 useful decorators that might come handy while prototyping namely -
@debug
@timer
@safe_run
debug
and timer
are taken from https://realpython.com/primer-on-python-decorators/.
@debug prints the function name with the arguments passed and the return value at the end each time a function is called.
@timer as the name suggests times the function to be executed and in the end prints the total time taken by that function.
@safe_run
is in brief tries to run the function and prints the error in case the function throws some error. @safe_run
takes dictionary of parameters also to let the user customize the behavior of it.
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
Built Distribution
Hashes for decos-0.0.12.post10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ba817eb05c921f2afa7401e9455aefd24451f7a757cb2201a2ad4ce6d529c59 |
|
MD5 | 3c18df0ac97ad6e82240c7038e45589a |
|
BLAKE2b-256 | f96100254c6d3b754bf9fcdd00ab9209c251e4042fa1f8f43365bcde3d43246c |