timeti
Serialize elapsed time of functions, loops and code blocks.
Experience
Install
pip install timeti
Usage
-
Profile function with decorator
>>> @timeti.profiler ... def ultimative_question(*args, **kwargs): ... sum(range(100_000)) ... >>> ultimative_question() Elapsed time of 'ultimative_question' function: 4 ms
-
Profile loop with wrap
>>> for i in timeti.profiler(range(2)): ... _ = sum(range(100_000)) ... Elapsed time of loop iteration 0: 4 ms Elapsed time of loop iteration 1: 3 ms Elapsed time of loop: 8 ms
-
Profile code blocks with context manager
>>> with timeti.profiler(): ... _ = sum(range(100_000)) ... Elapsed time of block: 5 ms
Development
Install
pip install -e ".[dev]"
Run linters
-
Format Python code with black
python -m black . -
Check types with mypy
python -m mypy . -
Sort imports alphabetically with isort
python -m isort . -
Analyze Python docstring with pydocstyle
python -m pydocstyle .
Run tests
-
Run tests
python -m unittest discover -s tests -
Run doctests for clock face
python -m doctest -v timeti/clockface.py
Metadata
Release files for timeti 0.4.0
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 | |
|---|---|---|---|---|
| timeti-0.4.0.tar.gz | 4.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| timeti-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / timeti-0.4.0.tar.gz
| Download URL | timeti-0.4.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68698af38b5361a44b2c20f357b44ce32cbbdf931feb142e4c77116580bb77bb
|
|
BLAKE2b-256 checksum How to use checksums |
315ee41351740d8b2c9d6a7eba2d10245fc7f356d5f6eeb29117c140a6e385ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / timeti-0.4.0-py3-none-any.whl
| Download URL | timeti-0.4.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43fe5f2fa063dcd4daf48a5fe0056bb18d6a5702dfb8ebb3f05c39ea930f4873
|
|
BLAKE2b-256 checksum How to use checksums |
e2bd5dc616905afd21c81483b21fdc73f583b1e1392f9eec09874050aa1885e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for timeti 0.4.0
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.