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/](realpython).
@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.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63a0d6a97c0045b919fd41b64b9f8787822521790f82d6350170b524d573d64b |
|
MD5 | 8d49766dbaae8d59cded7f3346032d72 |
|
BLAKE2b-256 | bf7ac39ec370a32aee345af64dcaaba14684ceeb1d27a59d120528ad898fc8d7 |