Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for decos, version 0.0.12.post4
Filename, size & hash File type Python version Upload date
decos-0.0.12.post4-py3-none-any.whl (4.0 kB) View hashes Wheel 3.6
decos-0.0.12.post4.tar.gz (2.7 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page