Metadata-Version: 2.1
Name: functimer
Version: 1.0.0
Summary: A function decorator/wrapper package to time a given function.
Home-page: https://github.com/EJEmmett/functimer
License: MIT
Keywords: timer,timed,timing,function,decorator
Author: Edward Emmett
Author-email: edemms12@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/EJEmmett/functimer
Description-Content-Type: text/markdown

# functimer

A function decorator/wrapper package to time a given function.

## Contents

- `functimer/timer.py`: contains the `timer` decorator.
- `functimer/util.py`: contains `get_unit` function, parses the unit from given string following the format of `0.0 ms`
- `functimer/classes.py`: contains general classes and enums of package.

### Installation
To install from PYPI:

    pip install functimer

To manually install:
    
    poetry build
    pip install dist/*.whl

How to install [Poetry](https://python-poetry.org/docs/#installation).

### Quick Example
Comprehensive Examples in `examples`
```py
@timed(unit=Unit.second, number=1)
def timed_sleep(seconds):
    sleep(seconds)

runtime = timed_sleep(0.3)
```

### Tests
Run `pytest` in the root directory of the repo.

### License
MIT

