POSIX exit status codes
Maintained. Last release 4 weeks ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
$
pip install exitstatusexitstatus — POSIX exit status definitions
exitstatus provides expressive, portable definitions for the
standard POSIX exit codes.
While Python does provide some Unix-specific exit status codes in the
os module, they are not portable to
all platforms and are missing the generic failure case.
Installation
You can add exitstatus to your project with uv using:
uv add exitstatus
Usage
Exit status codes are defined in a simple to use
IntEnum.
import sys
from exitstatus import ExitStatus
sys.exit(ExitStatus.success)