Execy
The execy @exec_time decorator is a utility that measures the execution time of a function. It can be used to easily track and log the time taken by a function to execute, both for synchronous and asynchronous functions.
Table of Contents
Installation
pip install execy
Usage
To use the exec_time decorator, follow these steps:
from execy import exec_time
import asyncio
import time
@exec_time
def sync_function():
# Simulate a time-consuming synchronous task
time.sleep(2)
@exec_time
async def async_function():
# Simulate a time-consuming asynchronous task
await asyncio.sleep(2)
# Call the decorated synchronous function
sync_function()
# Call the decorated asynchronous function
asyncio.run(async_function())
The result will be
Function 'sync_function' executed in 2.0001089572906494 seconds.
Function 'async_function' executed in 2.001432180404663 seconds.
Metadata
Release files for execy 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| execy-0.1.9.tar.gz | 3.8 kB | Without provenance | Details for execy-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| execy-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for execy-0.1.9-py3-none-any.whl |
Total release size: 6.6 kB
Release files / execy-0.1.9.tar.gz
| Download URL | execy-0.1.9.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c0bc0a9672880b72b17f2dbd4903106684573c910d3fb1605307eb5e78c6cd8
|
|
BLAKE2b-256 checksum How to use checksums |
f29f889e66d2400b15415bbff1ea73428fd0b3af97ced73a4dbb1381a0a676e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / execy-0.1.9-py3-none-any.whl
| Download URL | execy-0.1.9-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17ab9b6d95fcf041f1bb3edd5839055bcdc9237afa3efa66ce155e33f4bc0929
|
|
BLAKE2b-256 checksum How to use checksums |
6dfed1711b9a036582fd799707db045c679af6462bf35121774460c6d12fa5d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for execy 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.