python-scriptlock
Lock tool for scripts.
Package
Example
import time
import atexit
from scriptlock import Lock
lock = Lock()
atexit.register(lock.cleanup) # Needed to clean the lock correctly
time.sleep(100)
Launch another one and see what happend
Workaround
The use of atexit is necessary to correctly clean the lock. We tried to use the del module but it caused issues with the logger.
Tests
Testing is set up using pytest and coverage is handled with the pytest-cov plugin.
Run your tests with py.test in the root directory.
Coverage is ran by default and is set in the pytest.ini file. To see an html output of coverage open htmlcov/index.html after running the tests.
TODO
Travis CI
There is a .travis.yml file that is set up to run your tests for python 2.7 and python 3.2, should you choose to use it.
TODO
Metadata
Release files for scriptlock 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scriptlock-1.0.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / scriptlock-1.0.5-py2.py3-none-any.whl
| Download URL | scriptlock-1.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
86e36c684fd594990662c66072713d52907953406bb2b309b4d5c29043c07426
|
|
BLAKE2b-256 checksum How to use checksums |
00fd3e7be634ccf416075d77c999d1e5cbd469744484ece0a7c2fb4f08b58cf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for scriptlock 1.0.5
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.