click-lock-0.6
توضیحات
Adds locks and timeouts to click entrypoints
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | click-lock-0.6 |
| نام | click-lock |
| نسخه کتابخانه | 0.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Anton Bobrov |
| ایمیل نویسنده | baverman@gmail.com |
| آدرس صفحه اصلی | https://github.com/baverman/click-lock/ |
| آدرس اینترنتی | https://pypi.org/project/click-lock/ |
| مجوز | MIT |
click-lock
==========
Adds locks and timeouts to `Click <http://click.pocoo.org/>`_ entrypoints.
There is only one decorator ``click_lock.lock`` which can be applied
to click commands and groups:
.. code:: python
# example.py
import time
import click
import click_lock
@click.command()
@click_lock.lock
def cmd():
time.sleep(10)
cmd()
Now you have some additional options::
Usage: example.py [OPTIONS]
Options:
--lock fname Path to lock file
--timeout seconds Limit script execution time
--trace / --no-trace Log traceback in case of timeout [default: True]
--help Show this message and exit.
For example, lock script execution::
python example.py --lock /tmp/example.lck
Limit script execution time::
python example.py --timeout 1
نحوه نصب
نصب پکیج whl click-lock-0.6:
pip install click-lock-0.6.whl
نصب پکیج tar.gz click-lock-0.6:
pip install click-lock-0.6.tar.gz