Pytimers
Pytimers is a python micro library that allows you to quickly measure time to run functions, methods or individual blocks of codes. Here’s a quick demo.
import logging
from time import sleep
from pytimers import timer
logging.basicConfig(level=logging.INFO)
@timer
def foo() -> None:
print("Some heavy lifting.")
sleep(2)
if __name__ == "__main__":
print("Let's call the function decorated with timer.")
foo()
print("Use timer context manager.")
with timer.label("sleeping block"):
print("Some more work to do.")
sleep(1)
Let's call the function decorated with timer.
Some heavy lifting.
INFO:pytimers.triggers.logger_trigger:Finished foo in 2s 0.494ms [2.0s].
Use timer context manager.
Some more work to do.
INFO:pytimers.triggers.logger_trigger:Finished sleeping block in 1s 1.247ms [1.001s].
See the full Documentation.
Build Status
PyPi
Metadata
Release files for pytimers 3.1
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 |
|---|---|---|---|---|
| pytimers-3.1.tar.gz | 7.5 kB | Without provenance | Details for pytimers-3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytimers-3.1-py3-none-any.whl | Python 3 | none | any | Details for pytimers-3.1-py3-none-any.whl |
Total release size: 16.7 kB
Release files / pytimers-3.1.tar.gz
| Download URL | pytimers-3.1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df68c672a2fdd13e59fd767dddc0eafa90de6585eadfc0132d6ea865dc46baa8
|
|
BLAKE2b-256 checksum How to use checksums |
4619d8e3f1dcbe12cc14502d947e0c1d9e0caed8ac9e781bafcb469ab0a940df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pytimers-3.1-py3-none-any.whl
| Download URL | pytimers-3.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c83820058cb2052faf4a53892306daeecd7aec49350e72e2c3dfdac4b30dfeb
|
|
BLAKE2b-256 checksum How to use checksums |
5829d90cfc16d60609ccea837d73f9f1bfc0ad3b2b332d287a0f1767c493b98f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for pytimers 3.1
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.