time_utils
Basic python package to time processes similar to a stopwatch. This package also includes various pre-formated timestamps for sql, s3 key prefixes, and s3 glues prefixes.
stopWatch
A class intended to minimic the functionality of a stop watch. The lap function will return a human readable string of how much total time was elapsed as well as the lap time.
basic usage:
>>> from time_utils import time_utils as tu
>>> sw = tu.stopWatch()
>>> sw.lap()
Total Time:
4 second(s)
Lap 1:
4 second(s)
datetime.timedelta(seconds=4, microseconds=218298)
>>> sw.lap()
Total Time:
15 second(s)
Lap 2:
11 second(s)
datetime.timedelta(seconds=11, microseconds=440822)
preformatted datetime outputs
All functions default to utcnow(), however a datetime object can be passed in to any function.
ts_dict
>>> tu.time_utils.ts_dict()
{
'year': '2019',
'month': '12',
'day': '29',
'hour': '00',
'min': '24',
'sec': '43'
}
sql_ts
>>> tu.time_utils.sql_ts()
'2019-12-29 00:25:00'
s3_ts
>>> tu.time_utils.s3_ts()
'/2019/12/29/'
s3_glue_ts
>>> tu.time_utils.s3_glue_ts()
'/year=2019/month=12/day=29/'
Metadata
Release files for time-utils 1.0.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 |
|---|---|---|---|---|
| time_utils-1.0.1.tar.gz | 2.6 kB | Without provenance | Details for time_utils-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| time_utils-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for time_utils-1.0.1-py3-none-any.whl |
Total release size: 6.5 kB
Release files / time_utils-1.0.1.tar.gz
| Download URL | time_utils-1.0.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62fbd7f680dabfe5aa97af710e62eb7993673dea5448a86a086c40d434823bf8
|
|
BLAKE2b-256 checksum How to use checksums |
c4a0ee62c952c6a0b7d0b33294ca4688653f65ff1d7f0bcf14eb1df740057aad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.41.0 CPython/3.7.5
|
Release files / time_utils-1.0.1-py3-none-any.whl
| Download URL | time_utils-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
119550e8b53dc87187334b6b01f6c43136caed2f25044c3d40414370b979404b
|
|
BLAKE2b-256 checksum How to use checksums |
5a1fc8f75e96a1f8eff91201afc6ebbf47a2cf1d25ce52e79ab054f5bf4a614d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.41.0 CPython/3.7.5
|
Security for time-utils 1.0.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.