semvec/pypi-packages huggingface dataset:
durationstring 1.2.3
Get readable time in seconds.
License: MIT License

durationstring
==============

A small module to assist in getting readable time in seconds that can be easily passed to time.sleep(*seconds*).

Converters
----------

- s - seconds
- m - minutes
- h - hours
- d - days

Failing to provide a converter will default to seconds.

Examples
--------
.. code-block:: python

    import duration_string
    import time
    time.sleep(duration_string.get("2m"))
    duration_string.is_valid("2f") # raises ValueError


Tests
-----
These are run using docstrings.