Pidfile featuring stale detection and file-locking, can also be used as context-manager
Project description
PidFile class featuring:
stale detection
pidfile locking (fcntl)
chmod (default is 0o644)
chown
custom exceptions
Context Manager
PidFile can be used as a context manager:
with PidFile(): do_something()
Exception Order
In default mode PidFile will try to acquire a file lock before anything else. This means that normally you get a PidFileAlreadyLockedError instead of the PidFileAlreadyRunningError when running a program twice.
If you just want to know if a program is already running its easiest to use just PidFileError since it will capture all possible PidFile exceptions.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pid-1.0.2.tar.gz.
File metadata
- Download URL: pid-1.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b79a1ce586207f66d55214866f119e9195cb184db18aea9fd7ad3b148aaa3205
|
|
| MD5 |
df2a6d606f97b5e8f5c6a80b013b4bf5
|
|
| BLAKE2b-256 |
f4cd299516bd728d130656b6e5c29245f541d05d9a1b0c68e43e7c9c160cf5d9
|
File details
Details for the file pid-1.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: pid-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f58e29017d7a72d783d10ad03eb4fd9f69ff49bdc85de8b29977bc48adfa80b5
|
|
| MD5 |
dbfcc7b47579502bdf609069287f6b78
|
|
| BLAKE2b-256 |
a6369f2178c218680aff2dbddedec9d547ec46de21ba52cf0abd075167b60514
|