Registry / serialization / exitstatus

exitstatus

JSON →
library2.7.0pypypi✓ verified 85d ago

A Python library that provides named constants for POSIX exit status codes (e.g., EX_OK, EX_USAGE, EX_SOFTWARE). Current version 2.7.0, requires Python >=3.10. Release cadence is roughly once per year, following Python version support.

pip install exitstatus
INSTALL
IMPORT
SIG · EXITSTATUS
E
exitstatus
serializationpythonv2.7.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ExitStatus
from exitstatus import ExitStatus
ExitStatus is an IntEnum subclass that defines all POSIX exit codes.
EX_OK
from exitstatus import ExitStatus exit_code = ExitStatus.success
from exitstatus import EX_OK
Do not import individual constants directly; they were removed in v2.0.0. Use the ExitStatus enum instead.

Use ExitStatus IntEnum for clear, self-documenting exit codes.

import sys from exitstatus import ExitStatus sys.exit(ExitStatus.success) # exit code 0 # sys.exit(ExitStatus.failure) # exit code 1 # sys.exit(ExitStatus.usage) # exit code 64
Debug
Known issues
breakingIn v2.0.0, the library was rewritten to use an IntEnum; direct imports of EX_* constants (like 'from exitstatus import EX_OK') no longer work.
fix
Use 'from exitstatus import ExitStatus' and reference ExitStatus.success etc.
affects: >=2.0.0
deprecatedPython 3.9 and earlier are no longer supported as of v2.7.0.
fix
Upgrade Python to 3.10+ or use exitstatus <=2.6.0.
affects: >=2.7.0
gotchaExitStatus enum values are integers, but they are not compatible with plain int in some strict type checkers if you compare using 'is' instead of '=='. Always compare with '=='.
fix
Use 'sys.exit(ExitStatus.success) == 0' or 'if code == ExitStatus.success:'.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'EX_OK' from 'exitstatus'
Direct import of EX_* constants was removed in v2.0.0.
fix
Use 'from exitstatus import ExitStatus' and access ExitStatus.success.
AttributeError: module 'exitstatus' has no attribute 'EX_OK'
Trying to access EX_OK directly on the module after importing exitstatus.
fix
Use 'from exitstatus import ExitStatus' and then ExitStatus.success.
Upgrade
Version history
2.7.0latest on PyPI · released Jan 1, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources
exitstatus — pip install exitstatus · libregistry