Skip to main content

Lockfile object with timeouts and context manager

Project description

https://img.shields.io/pypi/v/skeleton.svg https://img.shields.io/pypi/pyversions/skeleton.svg https://img.shields.io/pypi/dm/skeleton.svg https://img.shields.io/travis/jaraco/skeleton/master.svg

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)

Uploaded Source

Built Distribution

yg.lockfile-2.2-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

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

Hashes for yg.lockfile-2.2.tar.gz
Algorithm Hash digest
SHA256 f802e4b024c8eefa5be62109ae018bbbb9db85578a936af332ae20a7896d9ce5
MD5 27a02f224aa0559825d4bc3fbb4d79fc
BLAKE2b-256 4cd2b8a413e588b3756093292100b043b49b64fcc7bc1d1afea828a2d829dcfc

See more details on using hashes here.

Provenance

File details

Details for the file yg.lockfile-2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for yg.lockfile-2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e8411cb70280d8b0d0d82c1de4a1277ff2caee6278b578132c42d1e6a0e19ef5
MD5 46096f91f4a81bb660fcbda1d62c8d65
BLAKE2b-256 9fabc54308d06305c285fb50dd6d2a27dcb05bccaed6ec1acbaffc3af1b0b59d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page