A platform independent file lock.
Project description
This package contains a single module, which implements a platform independent file locking mechanism for Python.
The lock includes a lock counter and is thread safe. This means, when locking the same lock object twice, it will not block.
import filelock
lock = filelock.FileLock("my_lock_file")
with lock:
pass
try:
with lock.acquire(timeout = 10):
pass
except filelock.Timeout:
pass
Documentation
The full documentation is available on readthedocs.org.
Contributions
Contributions are always welcome. Never hesitate to open a new issue.
License
This package is public domain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filelock-2.0.4.tar.gz
(5.0 kB
view details)
File details
Details for the file filelock-2.0.4.tar.gz
.
File metadata
- Download URL: filelock-2.0.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea72ebd7fff3f4d251ce4dfec8c0f116c80170a9fcc9280ae153a7e584b3bbd0 |
|
MD5 | 837b351d74a2469ba15daa8e38e08c5c |
|
BLAKE2b-256 | d73ee204d8b4bb7ebea32660fa06332276cba9a00b04452f02790649f9178851 |