No project description provided
Project description
prettimer
Is a package that gives a timer utility, with prettifiers that prompt a prettified runtime to the standard output.
The prettifiers are decorator functions built upon the Elapsed object, that
allow either to assess the runtime of a function without having to explicitly
call any magic, or to log a step of a process where the logging.logger is
pointing to.
Examples
Can use the the main time handler this way:
>>> from prettimer import Elapsed
>>> et = Elapsed()
>>> # do some process in between
>>> et.stampFromStart() # this returns a string
'Elapsed Time: 1 [mins] 3.785 [secs]'
Otherwise, can use decorator functions:
>>> from prettimer import timeit
>>> @timeit
... def prova():
... return np.random.randn(100000)
>>> prova()
prova: Elapsed Time: 0.002 [secs]
Full documentation can be found here
Installing prettimer
To install prettimer package, just:
pip install prettimer
Developing prettimer
To install prettimer along with the tools you need to develop and run tests, run the following in your virtual env:
pip install -e .[dev]
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 Distributions
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 prettimer-0.0.2.tar.gz.
File metadata
- Download URL: prettimer-0.0.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2950a5f65c8f6896e364cd92e4cb56a42706b223434dae015c60344ab5ab365
|
|
| MD5 |
f2f6992f0c32d3311bce9b7d5e7a7c7f
|
|
| BLAKE2b-256 |
042f20191e1e7eb2a7f3ee5c7c8d7bf09329d4492fe2edb65f0fc184e2ef44ee
|
File details
Details for the file prettimer-0.0.2-py3.7.egg.
File metadata
- Download URL: prettimer-0.0.2-py3.7.egg
- Upload date:
- Size: 10.9 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a5ea3c4626f19a11d14404f8985230d7d2436bef75394ca53b9579bbc749fef
|
|
| MD5 |
580fa0a5840ba0af46fa586fc82decd3
|
|
| BLAKE2b-256 |
7f3c36f12989045b62a784afebc33dc09d12b9904174bf72bb328907af982994
|
File details
Details for the file prettimer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: prettimer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43357d15118739bd09c67511440cb6de9e53bf13b7f61fdeea472d5bde86c330
|
|
| MD5 |
533a5f55385f6439e08ee66c4bb5cb46
|
|
| BLAKE2b-256 |
e995f9a650283aab5419738b530fa2172288a1c319efcf62a6e983d1b34d5e48
|