Simple utilities to time synchronous and asynchronous Python functions.
Project description
timing-utils
Simple utilities to time the execution of synchronous and asynchronous Python functions.
Installation
pip install timing-utils
Usage
from timing_utils import timeit, async_timeit
@timeit
def fast_func():
return sum(range(10000))
@async_timeit
async def slow_async_func():
import asyncio
await asyncio.sleep(1)
# Example of running the async function (in an async environment):
# await slow_async_func()
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and add tests if needed
- Run tests locally:
make test - Submit a pull request
Please follow the existing coding style and include relevant documentation if applicable.
License
This project is licensed under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timing_utils-0.1.3.tar.gz.
File metadata
- Download URL: timing_utils-0.1.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fead9db5f939dff9846b23575e5e8a86e9198d60c9a1aa933196a79986633ac
|
|
| MD5 |
6733a3d2dc14ec6edece9c65805d0bd6
|
|
| BLAKE2b-256 |
07855d5ca8c293af620815d0ab92b216eb4f3b92a97b8823745a2aaad6de8b20
|
File details
Details for the file timing_utils-0.1.3-py3-none-any.whl.
File metadata
- Download URL: timing_utils-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35396a2a4929db4a93116e49365452f8ef078a6b6b0a54c01936668a12250422
|
|
| MD5 |
5f256b8491c41eedb8f54dab9e858a71
|
|
| BLAKE2b-256 |
24b007fcfcee8c60ae1937115b41aeaa4100d891b71fca5d279e5799d7b75ff6
|