Skip to main content

Parse time deltas from human-readable strings

Project description

htd

htd stands for human time delta and is a micro-library to parse strings such as 7d4h into timedelta(days=7, hours=4).

Install

pip install htd

With Poetry:

poetry add htd

Usage

import htd

htd.parse("7d")
# => datetime.timedelta(days=7)

Project details


Download files

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

Source Distribution

htd-0.0.2.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

htd-0.0.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file htd-0.0.2.tar.gz.

File metadata

  • Download URL: htd-0.0.2.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for htd-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6606230a7bb874fe6f91a05746ed13eff918ba2c3b5550bbfeb89b7096600a34
MD5 0a51e2a614e07a0ca0372d9d34e0c65d
BLAKE2b-256 45c5b5118aae799b4ea732c2a1acf158f6b6248579211afba67ba6ebc1556a5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for htd-0.0.2.tar.gz:

Publisher: publish.yml on Bixoto/htd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file htd-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: htd-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for htd-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 57eb1acb0adca70aaab09beb34337cc61aa0579f7c25a27d3ee508f43021dd56
MD5 5924bc50a32499409afc31d80ff8ccca
BLAKE2b-256 8800f7d8dee2d467470944420fb76c8b24ebd1334c90be25e57e8d49a4d809de

See more details on using hashes here.

Provenance

The following attestation bundles were made for htd-0.0.2-py3-none-any.whl:

Publisher: publish.yml on Bixoto/htd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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