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.
You can add exitstatus to your project with uv using:
uv add exitstatusExit status codes are defined in a simple to use IntEnum.
import sys from exitstatus import ExitStatus sys.exit(ExitStatus.success)