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 tox
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.1.0.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for functimer-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 941c441aee4ed0ecedec04fef430badb4d4a4158422e48e3827fa8fad2c4d7b1 |
|
MD5 | fc8d0ac3827b7310b8b12dff8c1d61e1 |
|
BLAKE2b-256 | 9d2684002fd615980b8d4e7b4417f2dadd5a6630bf57d7282df87ce381f19576 |