Duration Humanizer
A lightweight Python package that converts durations in seconds into a human-readable format.
Features
- Convert seconds into days, hours, minutes, and seconds
- Simple and easy-to-use API
- Lightweight with no external dependencies
Installation
pip install duration-humanizer
Usage
from duration_humanizer import humanize
print(humanize(3661))
Output
1 hour 1 minute 1 second
More Examples
from duration_humanizer import humanize
print(humanize(45))
# 45 seconds
print(humanize(125))
# 2 minutes 5 seconds
print(humanize(3661))
# 1 hour 1 minute 1 second
print(humanize(90061))
# 1 day 1 hour 1 minute 1 second
Project Links
- PyPI: https://pypi.org/project/duration-humanizer/
- GitHub: https://github.com/maheshwarimanish/duration-humanizer
License
MIT License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 duration_humanizer-0.2.3.tar.gz.
File metadata
- Download URL: duration_humanizer-0.2.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6c4bcc20c4a7e04d8b554601403fc6f3be5b877e6e3e1633a2762882d2e5bca
|
|
| MD5 |
b00827cf291917c3b8876e5f767ba32b
|
|
| BLAKE2b-256 |
20e8b1298f0b05aec47b72c56c9d1072662c6ed517a37ead7e811a5960085462
|
File details
Details for the file duration_humanizer-0.2.3-py3-none-any.whl.
File metadata
- Download URL: duration_humanizer-0.2.3-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff96089831d3beaae342da6ee91443b88bccfb0ec07ea44d6f0b0451f49251e1
|
|
| MD5 |
3a67eb670c745e1a91f6dfaef3e0a649
|
|
| BLAKE2b-256 |
543b770280ffe4245692625bcedc5f9a6be2407d996c68da88a1aeda73c92f99
|