exit-codes
Platform-independent exit codes.
What it is and what it does
exit_codes is a minimal library that exposes Unix-style exit status codes as Python constants, solving the problem that Python's os module only provides these codes on Unix platforms. It lets you write portable scripts that return meaningful exit codes across Windows, macOS, and Linux without platform-specific conditionals.
The package is straightforward: import ExitCode and use its attributes (OK, IO_ERR, and others) in your main() function or script exit logic. It has no runtime dependencies and installs as a pure Python wheel, making it lightweight. However, the project has not been updated since July 2019 and is marked abandoned, so it will not receive maintenance or adapt to future Python changes.
Use it for:
- CLI tools that need to return standard exit codes consistently across Windows and Unix systems
- Scripts that wrap system utilities and must propagate meaningful exit statuses to calling processes
- Testing frameworks or build tools that rely on exit codes to signal success or specific failure modes
- Cross-platform Python applications where exit code semantics matter to shell scripts or CI/CD pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides platform-independent exit codes for Python programs, making Unix exit status codes available consistently across all platforms.
Yes, if you need cross-platform exit codes and can accept that the package is no longer maintained. The library is simple, has no dependencies, and the exit code constants are unlikely to change. Install it only if you're comfortable with a frozen codebase and confident the constants match your needs; for new projects, consider whether you can define your own exit codes or use a more actively maintained alternative.
Install
exit-codes on PyPI
pip
pip install exit-codesuv
uv add exit-codespoetry
poetry add exit-codesInstalling exit-codes
Before you install
Installation is frictionless with no runtime dependencies and a pure-Python wheel distribution. However, the package has been abandoned since 2019 with no updates in over six years, so it will not receive bug fixes or maintenance.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from exit_codes import ExitCode
if operation_succeeds():
exit(ExitCode.OK)
else:
exit(ExitCode.IO_ERR)
Verify before relying
- Whether the exit code constants match current Unix standards or have diverged since the last 2019 release
- Compatibility with modern Python versions beyond what the unspecified support statement indicates
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,593 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 362,171/month — #7,234 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: exit_codes-1.3.0-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
exitstatusProvides portable, type-safe POSIX exit status…
permissive · top 15,000 on PyPI
pylint-exitTranslates pylint's bit-encoded exit codes into…
permissive · top 15,000 on PyPI
python-statusProvides named constants for HTTP status codes…
permissive · top 15,000 on PyPI
lib-cli-exit-toolsProvides portable signal handling,…
permissive · top 15,000 on PyPI
python-yakhCaptures individual keypresses from terminal…
permissive · top 15,000 on PyPI
ntstatusProvides Python constants and lookup methods…
permissive · top 15,000 on PyPI
pytest-custom-exit-codeA pytest plugin that lets you customize the…
permissive · top 5,000 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
lockfileProvides a platform-independent file locking…
permissive · top 1,000 on PyPI
oschmodSets file permissions consistently across…
permissive · top 15,000 on PyPI