Skip to main content

A package to convert user input into datetime.timedelta objects

Project description

Checked with mypy linting: pylint Code style: black

Codecov Checks Type Check and Lint Unit Tests pre-commit.ci status

PyPI version info PyPI supported Python versions Documentation Status Download Counter Latest release

A package to convert user input into datetime.timedelta objects.

PyPI: https://pypi.org/project/time-str/

Docs: https://time-str.rtfd.io/

Installation

You can install released versions of time_str from the Python Package Index via pip or a similar tool:

Stable Release: pip install time_str

Working Version: pip install git+https://github.com/BobDotCom/time_str.git

Usage

>>> import time_str
>>> time_str.convert('11 months 9days 1m 3 sec')
datetime.timedelta(days=345, seconds=63)
>>> time_str.convert('2 months 3w 1 d 5hour 3 min')
datetime.timedelta(days=83, seconds=18180)

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

time_str-0.1.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

time_str-0.1.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file time_str-0.1.2.tar.gz.

File metadata

  • Download URL: time_str-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for time_str-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f95052e3e3cbcdc67d4bb0931f5b340fb694b6f3f7e148fe60c46c2725d2fa25
MD5 a263619c487e60b50e611476d2c08be4
BLAKE2b-256 5e240525d43ef4188fe85d2efb1ce6bf958c752867d1ce08bc5d60465f3fdb7c

See more details on using hashes here.

File details

Details for the file time_str-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: time_str-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for time_str-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ea906f303be014ada2ef0ce5dc8eca5fbd5884ccd352193fd96c435021e7253
MD5 331401df5bfabe02efc2efaebcf55d4e
BLAKE2b-256 38e0a27e06a58cf786c607db6895afafedc800f809507c3ec4842a440ed44609

See more details on using hashes here.

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