Lockfile object with timeouts and context manager
Project description
A FileLock class that implements a context manager with timeouts on top of zc.lockfile, an excellent, cross-platorm implementation of file locking.
License
License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see this explanation.
Usage
Example usage:
import yg.lockfile try: with yg.lockfile.FileLock('/tmp/lockfile', timeout=900): protected_operation() except yg.lockfile.FileLockTimeout: handle_unable_to_lock()
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
yg.lockfile-2.2.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file yg.lockfile-2.2.tar.gz
.
File metadata
- Download URL: yg.lockfile-2.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f802e4b024c8eefa5be62109ae018bbbb9db85578a936af332ae20a7896d9ce5 |
|
MD5 | 27a02f224aa0559825d4bc3fbb4d79fc |
|
BLAKE2b-256 | 4cd2b8a413e588b3756093292100b043b49b64fcc7bc1d1afea828a2d829dcfc |
Provenance
File details
Details for the file yg.lockfile-2.2-py2.py3-none-any.whl
.
File metadata
- Download URL: yg.lockfile-2.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8411cb70280d8b0d0d82c1de4a1277ff2caee6278b578132c42d1e6a0e19ef5 |
|
MD5 | 46096f91f4a81bb660fcbda1d62c8d65 |
|
BLAKE2b-256 | 9fabc54308d06305c285fb50dd6d2a27dcb05bccaed6ec1acbaffc3af1b0b59d |