EZ File Lock
A simple cross-platform File Lock
Quick start:
pip install ezfilelock
Usage
Use just like builtin method open()
from ezfilelock import open
with open('xxx.txt','r') as f:
print(f.read())
Use FileLock instance
from ezfilelock import FileLock
from builtin import open
with FileLock('xxx.txt'):
# do continuous things with lock
with open('xxx.txt','w') as f:
f.write('hello')
with open('xxx.txt','a') as f:
f.write('world!')
with open('xxx.txt','r') as f:
f.read()
Read Write Lock
Cannot Write when Reading.
Cannot Read when Writing.
Can Read by multiple threads at the same time
from ezfilelock import rwopen
with rwopen('xxx.txt',mode='w') as f:
f.write('hello world')
with rwopen('xxx.txt',mode='r') as f:
print(f.read())
Metadata
Release files for ezfilelock 1.0.1
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 |
|---|---|---|---|---|
| ezfilelock-1.0.1.tar.gz | 3.1 kB | Without provenance | Details for ezfilelock-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ezfilelock-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for ezfilelock-1.0.1-py3-none-any.whl |
Total release size: 7.1 kB
Release files / ezfilelock-1.0.1.tar.gz
| Download URL | ezfilelock-1.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a55e733dc5aee814017db9e815db9eda0bd50d8c7c1a22c1173321eca6c01cb2
|
|
BLAKE2b-256 checksum How to use checksums |
bbddbd14e3bcfe49b18bdd855f6b47c5e05c803e348205229ee48e5c3d2d1ea5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.10
|
Release files / ezfilelock-1.0.1-py3-none-any.whl
| Download URL | ezfilelock-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80e3375e7c2885f5e787937a2bf38748dee881dee9015fc20665c8e2d82f4054
|
|
BLAKE2b-256 checksum How to use checksums |
a37701eff3fa9903ea913a1be08b2bf2bb34952ea12fecbeeb7851e9e28efe48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.10
|
Security for ezfilelock 1.0.1
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.