flockfile-0.1.2
توضیحات
A simple lock file class based on file locking.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flockfile-0.1.2 |
| نام | flockfile |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ryan Veach |
| ایمیل نویسنده | rveach@gmail.com |
| آدرس صفحه اصلی | https://gitlab.com/rveach/flockfile |
| آدرس اینترنتی | https://pypi.org/project/flockfile/ |
| مجوز | MIT |
# flockfile
Just a simple python lock file class using file locks.
## Installation
```bash
pip install flockfile
```
## Usage
```python
from flockfile import FlockFile, FileNotLocked
# init the class using a file name
# optionally, the directory can be set to something other than /tmp
lock = FlockFile("myscriptname", lock_dir="/tmp")
# lock the file
lock.lock()
# if this is unsuccessful, exception FileNotLocked will be raised.
# the following class method can be used to check lock status
assert lock.check_lock()
# unlock and delete file
lock.unlock()
```
## Questions or Issues?
Please report as a Gitlab issue: https://gitlab.com/rveach/flockfile/issues
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=2.7 | Python |
نحوه نصب
نصب پکیج whl flockfile-0.1.2:
pip install flockfile-0.1.2.whl
نصب پکیج tar.gz flockfile-0.1.2:
pip install flockfile-0.1.2.tar.gz