This module provides convenient ways to guarantee a certain script state.
run.alone
Make sure only one instance of the program is running, this is done by acquiring an fcntl file lock on the current script:
>>> import run.alone
Caveats
There are a few things to keep in mind:
import run.alone once, it will exit your program if it gets imported twice
symlinked scripts will be resolved to the inode it has been linked to, this is a limitiation of using fcltn file locks
run.until
Run until a specified timespec, if the process runs longer, it will be killed:
>>> import run
>>> run.until('23m42s')
>>> ...
You can also choose to limit on the amount of CPU-time being consumed (default is wall clock time):
>>> run.until('42s', 'cpu')
>>> ...
Acknowledgements
This module is dirived from the Sys::RunAlone and Sys::RunUntil perl modules written by Elizabeth Mattijsen.
Metadata
Release files for run 0.3
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 |
|---|---|---|---|---|
| run-0.3.tar.gz | 4.4 kB | Without provenance | Details for run-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| run-0.3-py3-none-any.whl | Python 3 | none | any | Details for run-0.3-py3-none-any.whl |
Total release size: 9.6 kB
Release files / run-0.3.tar.gz
| Download URL | run-0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fedf927ccee02e797912af574d31a6d394073716db6864beb2bb75e05df3f36
|
|
BLAKE2b-256 checksum How to use checksums |
7bddbe134411d3f2bf7e216e37d7136ed6bae74f06dc1683d929c5ca9bfcdb3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / run-0.3-py3-none-any.whl
| Download URL | run-0.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93600874ef1f7de3b178efe6607db32afb4ff45acdf640c76bbed851f6494a60
|
|
BLAKE2b-256 checksum How to use checksums |
e15df831e942a2ed684564bd099ac22f5e8ae0e9cbf45814f471565248ec875b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for run 0.3
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.