Skip to main content

garudadidada

Tiny, zero-dependency helpers to humanize values: byte sizes, durations, English ordinals, and pluralization. Pure Python, no dependencies.

Install

pip install garudadidada

Usage

from garudadidada import format_bytes, format_duration, ordinal, pluralize

format_bytes(1536)        # "1.5 KB"
format_bytes(1073741824)  # "1 GB"

format_duration(90)       # "1m 30s"
format_duration(90061)    # "1d 1h 1m 1s"

ordinal(1)                # "1st"
ordinal(22)               # "22nd"

pluralize(1, "file")              # "1 file"
pluralize(3, "file")              # "3 files"
pluralize(2, "person", "people")  # "2 people"

API

  • format_bytes(num_bytes) — binary (1024) units, B..YB.
  • format_duration(seconds) — splits into d/h/m/s, omits zero parts.
  • ordinal(n) — English ordinal suffix (handles 11-13).
  • pluralize(count, singular, plural=None) — picks form by count; defaults plural to singular + "s".

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

garudadidada-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

garudadidada-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file garudadidada-1.0.0.tar.gz.

File metadata

  • Download URL: garudadidada-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for garudadidada-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b3eb66c44586777c663469ee2eed8d1e7b885a705533df775854ed0c2735135
MD5 e38fb2687e897abeda1545fbbec9aecd
BLAKE2b-256 9f96676e01c28d779bdec912ec1ad802ff231b65ad5aa84230286dfdca0eba4a

See more details on using hashes here.

File details

Details for the file garudadidada-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: garudadidada-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for garudadidada-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2388787599caf8bc5e02c4358b8f8e8c17d316766224855b95e7392e64472d4b
MD5 bb575f4dab00b548a0af0a75d8a5de52
BLAKE2b-256 7f6b91ab7647c0bcbbcb03482651091c06eb2b443cefc0e6af33f0d9724d29d1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page