Convert between seconds and human-readable time in CLI or code.
Project description
py-humantime
Convert between seconds and human-readable time in CLI or Python code.
Installation
pip install .
CLI Usage
py-humantime --to-human 4523 # → 1h 15m 23s
py-humantime --to-seconds "1h 15m" # → 4500
Python Usage
from pyhumantime import seconds_to_human, human_to_seconds
print(seconds_to_human(4523)) # → '1h 15m 23s'
print(human_to_seconds("1h 15m 23s")) # → 4523
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
py_humantime-0.1.0.tar.gz
(2.9 kB
view details)
Built Distribution
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 py_humantime-0.1.0.tar.gz.
File metadata
- Download URL: py_humantime-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a8ae44178d9f9c840916c0c81df1de85a6e5967aa96969e0ae9ea534a1bc4f
|
|
| MD5 |
c2a72aa6cf67397ee6197ca601f67906
|
|
| BLAKE2b-256 |
298241341f75d836ae48826e31b630c3d45d361947d6dc72b389d7a8b12a63e0
|
File details
Details for the file py_humantime-0.1.0-py3-none-any.whl.
File metadata
- Download URL: py_humantime-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd35246962766b8695264b4ce755d03a8f0822c67124e57ffcdcc2f632caff55
|
|
| MD5 |
13d58e90914f7f271275af777a66dc06
|
|
| BLAKE2b-256 |
270ee15904ab30b0f13a5086863f978b9927e5a629c4d24e7620ba56c24f431c
|