durationstring-1.2.3
توضیحات
Get readable time in seconds.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | durationstring-1.2.3 |
| نام | durationstring |
| نسخه کتابخانه | 1.2.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | George Nyoro |
| ایمیل نویسنده | geonyoro@gmail.com |
| آدرس صفحه اصلی | https://github.com/geonyoro/durationstring |
| آدرس اینترنتی | https://pypi.org/project/durationstring/ |
| مجوز | 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.
نحوه نصب
نصب پکیج whl durationstring-1.2.3:
pip install durationstring-1.2.3.whl
نصب پکیج tar.gz durationstring-1.2.3:
pip install durationstring-1.2.3.tar.gz