Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

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()

Release history Release notifications

This version
History Node

2.3

History Node

2.2.2

History Node

2.2.1

History Node

2.2

History Node

2.1.1

History Node

2.1

History Node

2.0

History Node

1.1.2

History Node

1.1.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
yg.lockfile-2.3-py2.py3-none-any.whl (6.8 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Aug 14, 2017
yg.lockfile-2.3.tar.gz (6.5 kB) Copy SHA256 hash SHA256 Source None Aug 14, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page