Skip to main content

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

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

duration_humanizer-0.2.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duration_humanizer-0.2.3-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

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

Hashes for duration_humanizer-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e6c4bcc20c4a7e04d8b554601403fc6f3be5b877e6e3e1633a2762882d2e5bca
MD5 b00827cf291917c3b8876e5f767ba32b
BLAKE2b-256 20e8b1298f0b05aec47b72c56c9d1072662c6ed517a37ead7e811a5960085462

See more details on using hashes here.

File details

Details for the file duration_humanizer-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for duration_humanizer-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ff96089831d3beaae342da6ee91443b88bccfb0ec07ea44d6f0b0451f49251e1
MD5 3a67eb670c745e1a91f6dfaef3e0a649
BLAKE2b-256 543b770280ffe4245692625bcedc5f9a6be2407d996c68da88a1aeda73c92f99

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page