Skip to main content

A decorator/wrapper package to time a given function.

Project description

functimer

A decorator/wrapper package to time a given function.

PyPI version


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


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)

Uploaded Source

Built Distribution

functimer-1.0.7-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page