Simple Timing
Installation
pip install simpletiming
Usage
As decorator
from simpletiming import Timer
from time import sleep
@Timer(name="Potato")
def potato():
sleep(1)
potato()
# Elapsed time: 1.0011 seconds
As object
timer = Timer()
timer.start()
sleep(1)
timer.stop()
# Elapsed time 1.0011 seconds
As context manager
with Timer(message="Elapsed time: {minutes:0.4f} minutes"):
sleep(1)
# Elapsed time: 0.0167 minutes
On all class methods
@Timer(name="MyClass", message="{name}: {seconds:0.4f} seconds")
class MyClass:
def potato(self):
sleep(1)
obj = MyClass()
obj.potato()
# MyClass: 1.0011 seconds
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for simpletiming 0.1.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 |
|---|---|---|---|---|
| simpletiming-0.1.1.tar.gz | 3.5 kB | Without provenance | Details for simpletiming-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpletiming-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for simpletiming-0.1.1-py3-none-any.whl |
Total release size: 7.1 kB
Release files / simpletiming-0.1.1.tar.gz
| Download URL | simpletiming-0.1.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7de30ae8c3dbf9edb9e82e198ff895b66ed68c367aa93b0b605ac8ed2cfd8edc
|
|
BLAKE2b-256 checksum How to use checksums |
c70711eb99240900e908e63caadde0f5ede7a1db18ddca3f9adf336cf6cc9bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-59-generic
|
Release files / simpletiming-0.1.1-py3-none-any.whl
| Download URL | simpletiming-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e95f6d8f7042048ffbd803b06d6149a981bd535abc85397667ade9e50d297cd
|
|
BLAKE2b-256 checksum How to use checksums |
6abb41cabaf7ad2137b426a1d796a1aaf0b7ffbc6b1aa785830aa7be7f1cf293
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-59-generic
|
Security for simpletiming 0.1.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.