A decorator/wrapper package to time a given function.
Project description
functimer
A decorator/wrapper package to time a given function.
Installation
PYPI:
pip install functimer
Manual:
poetry build
pip install dist/*.whl
How to install Poetry.
Quick Example
Comprehensive Examples in examples
@timed(unit=Unit.second, number=1)
def timed_sleep(seconds):
sleep(seconds)
runtime = timed_sleep(1)
"1.00 s"
Tests
Run pytest
in the root directory of the repo.
License
MIT
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
functimer-1.0.7.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for functimer-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126f4f17b27ba177a325772afae191ff59bb234735ad407aa4033773c84ad002 |
|
MD5 | 1531f069d6fceb22aabb4e00ff5700fb |
|
BLAKE2b-256 | 7ae158d949d16310a15ce7496e4c5f252ac45769b36c1430f83ba400eec57223 |