uc_pidfile
A set of classes and functions for managing pidfile.
It is part of the Unicon project.
Using:
import uc_pidfile
Functions:
process_exists(pid)
Checks if the process is running. Returns True if process exists and False if not.
read_pid(filename)
Reads pid from file.
If the file exists and is successfully read, then returns pid otherwise returns None.
May raise exceptions:
- PermissionError
- ValueError
validate_pidfile(filename)
Checks the contents of pidfiles for an integer.
Returns True if valid or False if not.
May raise exceptions:
- FileNotFoundError
- PermissionError
is_running(filename)
Returns True if the process is running, otherwise returns False.
It will also be considered that the process is started even if there is no access to the file. And it will be considered that the process is not started if there is no file or the file contains incorrect data.
Classes:
PidFile(filename, overwrite=False)
Creates pid file.
If the file already exists and overwrite = True it will be overwritten. But if overwrite = false then this will throw an exception FileExistsError.
May raise exceptions:
- FileExistsError
- PermissionError
- FileNotFoundError (If the target directory does not exist, for example.)
Release files for uc-pidfile 0.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 | |
|---|---|---|---|
| uc_pidfile-0.0.3.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uc_pidfile-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / uc_pidfile-0.0.3.tar.gz
| Download URL | uc_pidfile-0.0.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83b06a8820055df652c52e9178e48b3e185529898b7453829392c10e1b4aaaf0
|
|
BLAKE2b-256 checksum How to use checksums |
3bd8b069d225f54353ed240a4063ff3d35c50089c66a4ef0db6487e734b6d4ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
|
Release files / uc_pidfile-0.0.3-py3-none-any.whl
| Download URL | uc_pidfile-0.0.3-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73c42a71daaab62c686704b0b69d88f13ba722f079a7c42a9c4395ccfbd863a4
|
|
BLAKE2b-256 checksum How to use checksums |
0e2a69640e70bc326e2e8d31938d17b6df820f817c0c10022c92b88dd2cb9485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
|