Skip to main content

Duration parser.

Project description

Duration Parser

A simple python implementation of a duration parser.

Installation

pip install duration-parser

Usage

from duration_parser import parse

seconds = parse('1d2h')
seconds = parse('2 years 3 weeks')
seconds = parse('1.234min')
seconds = parse('1d, 2 weeks')

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

duration-parser-1.0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

duration_parser-1.0.1-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

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