Readers / writers file lock Python helper class
This library was created in order to ease the synchronization of several processes using shared resources, like a caching directory or a SQLite database. All of them can use the resources, but only one should update them.
The library is being used in several INB projects.
Example of a shared lock using context:
import datetime
import os
import time
from RWFileLock import RWFileLock
lock = RWFileLock("/tmp/rwfilelock.lock")
with lock.shared_lock():
print(
f"[{datetime.datetime.now().isoformat()}] Got shlock {os.getpid()}"
)
time.sleep(7)
print(
f"[{datetime.datetime.now().isoformat()}] Releasing shlock {os.getpid()}"
)
Metadata
Release files for RWFileLock 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| RWFileLock-0.2.2.tar.gz | 13.1 kB | Without provenance | Details for RWFileLock-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| RWFileLock-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for RWFileLock-0.2.2-py3-none-any.whl |
Total release size: 27.5 kB
Release files / RWFileLock-0.2.2.tar.gz
| Download URL | RWFileLock-0.2.2.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41ec012d8edd1827d39553ce5cd9e59b04870f885ab1710da2b275e349a0ab66
|
|
BLAKE2b-256 checksum How to use checksums |
c4258324fc6725daafa04c06222217c5b7e8f5c97c77471a8d791f105716e1b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Release files / RWFileLock-0.2.2-py3-none-any.whl
| Download URL | RWFileLock-0.2.2-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24d60c9192021c6fad19b5163849188bbc20df9e01a519f130431f60a5751c36
|
|
BLAKE2b-256 checksum How to use checksums |
5f2bd1caae8b2de44b6cec5416e01cc3c6a09fa24263b02f7b0372e2dbed681c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Security for RWFileLock 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.